﻿Module GenerateItem
    'The following are variables for generating random items, these are local only
    Private requiredlevel, bash, slash, pierce, fist, exotic, weight, value, durability, armortype, affects As String
    Private armorlook, armorequip, armorparid, armorreqlevel, thearmortype, armorvalue As String
    Private LastGeneratedCraftsmanship As Short 'prevents the same craft and consequently item from being randomized twice in a row
    Private LastGeneratedArmor As String
    Private LastGeneratedWeapon As Short

    'The following is for stable random items aka: Random items that have been purchased or are currently in use (Note that they have 59, that's 39 for inventory +20 equipment slots, maximum held
    Public RItem_VIRID(59), RItem_ITEMT(59), RItem_ITEMC(59), RItem_ITEMN(59), RItem_SHORT(59), RItem_LONGD(59), RItem_LOOKD(59) As String
    Public RItem_BasicType(59), RItem_SexRequirement(59), RItem_LevelRequirement(59), RItem_ClassRequirement(59), RItem_PurchasableAreas(59) As String
    Public RItem_BashAC(59), RItem_SlashAC(59), RItem_PierceAC(59), RItem_ExoticAC(59), RItem_FistAC(59), RItem_Type(59), RItem_Material(59), RItem_Craftsmanship(59) As String
    Public RItem_Quality(59), RItem_ProfReq(59), RItem_Weight(59), RItem_DurabilityCount(59), RItem_DurabilityPerc(59), RItem_Affect1(59), RItem_Affect2(59) As String
    Public RItem_DamageType(59), RItem_AreaOfAffect(59), RItem_DamageDie(59), RItem_DamageDieType(59), RItem_2Handed(59), RItem_Worth(59) As String
    Private Function SNDArmorFormat(ByVal AT As String, ByVal ET As String, ByVal PR As String, ByVal LV As String, ByVal SE As String, ByVal BA As String, ByVal SA As String, ByVal PA As String, ByVal FA As String, ByVal EA As String, ByVal PU As String, ByVal CO As String, ByVal MA As String, ByVal WE As String)
        Dim lvlreq As String = ""
        Dim BashAC As String = "", SLashAC As String = "", PierceAC As String = "", FistAC As String = "", ExoticAC As String = ""
        Dim affects As String = ""
        Dim weight As String = ""
        Dim longd As String = ""
        Dim ERRORnum As Short = 0
        Dim VIRIDnum As String = "0"
        If requiredlevel > LV Then LV = requiredlevel
        While Len(LV) < 3 : LV = "0" + LV : End While
        Dim Equipprof As String = PR
        If MA = "yes" Then
            If Equipprof = armortype And Equipprof <> "" Then Equipprof += ", and " + armortype
            If Equipprof = "" Then Equipprof = armortype
        End If
        If MA = "Yes" Then
            BashAC = Str(Val(bash) + Val(BA))
            SLashAC = Str(Val(slash) + Val(SA))
            PierceAC = Str(Val(pierce) + Val(PA))
            FistAC = Str(Val(fist) + Val(FA))
            ExoticAC = Str(Val(exotic) + Val(EA))
        Else
            BashAC = BA
            SLashAC = SA
            PierceAC = PA
            FistAC = FA
            ExoticAC = +EA
        End If
        If MA = "Yes" Then
            armorvalue = comworth(CO, value)
        Else
            armorvalue = CO
        End If
        If MA = "No" Then
            durability = "30:95%"
            If ET = "Head" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Neck" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Chest" Then
                weight = LTrim(Str(Val(WE) * 4)) + " Stones"
            ElseIf ET = "Shoulders" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Arms" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Wrists" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Hands" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Back" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Waist" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Legs" Then
                weight = LTrim(Str(Val(WE) * 3)) + " Stones"
            ElseIf ET = "Feet" Then
                weight = LTrim(Str(Val(WE) * 3)) + " Stones"
            ElseIf ET = "Shield" Then
                weight = LTrim(Str(Val(WE) * 5)) + " Stones"
            End If
        Else
            If ET = "Head" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Neck" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Chest" Then
                weight = LTrim(Str(Val(WE) * 4)) + " Stones"
            ElseIf ET = "Shoulders" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Arms" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Wrists" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Hands" Then
                weight = LTrim(Str(Val(WE) * 2)) + " Stones"
            ElseIf ET = "Back" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Waist" Then
                weight = LTrim(Str(Val(WE) * 1)) + " Stones"
            ElseIf ET = "Legs" Then
                weight = LTrim(Str(Val(WE) * 3)) + " Stones"
            ElseIf ET = "Feet" Then
                weight = LTrim(Str(Val(WE) * 3)) + " Stones"
            ElseIf ET = "Shield" Then
                weight = LTrim(Str(Val(WE) * 5)) + " Stones"
            End If
        End If
        Dim tmp0 As Integer
        durability = Replace(durability, "%", "")
        For tmp0 = 1 To Len(durability) Step 1
            If Mid(durability, tmp0, 1) = ":" Then
                While Len(Mid(durability, 1, tmp0 - 1)) < 3 : durability = "0" + durability : tmp0 = InStr(durability, ":") : End While
                While Len(Mid(durability, tmp0 + 1, Len(durability))) < 3 : durability = Mid(durability, 1, tmp0) + "0" + Mid(durability, tmp0 + 1, Len(durability)) : End While
            End If
        Next
        thearmortype = AT
        armorlook = AT
        armorequip = ET
        armorreqlevel = LV
        armorparid = "," + LTrim(BashAC) + "," + LTrim(SLashAC) + "," + LTrim(PierceAC) + "," + LTrim(FistAC) + "," + LTrim(ExoticAC) + "," + Mid(SE, 1, 1) + "," + LV + "," + Equipprof + "," + weight + "," + durability + "," + affects + "," + PU
        Return ""
    End Function
    Public Function GatherMaterialInfo(ByVal material As String)
        If material = "Magnesium" Then
            requiredlevel = "12"
            bash = "2"
            slash = "1"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "3 Stones"
            value = "+20 Vern"
            durability = "25:99%"
            armortype = "Heavy"
            affects = "+Fire3, +WaterResistance13"
        ElseIf material = "Aluminium" Then
            requiredlevel = "22"
            bash = "3"
            slash = "2"
            pierce = "1"
            fist = "3"
            exotic = "4"
            weight = "4 Stones"
            value = "+5 Vern"
            durability = "31:98%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Duralumin" Then
            requiredlevel = "43"
            bash = "4"
            slash = "3"
            pierce = "3"
            fist = "6"
            exotic = "5"
            weight = "5 Stones"
            value = "+13 Vern"
            durability = "44:100%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Silumin" Then
            requiredlevel = "45"
            bash = "4"
            slash = "3"
            pierce = "7"
            fist = "5"
            exotic = "3"
            weight = "3 Stones"
            value = "+11 Vern"
            durability = "28:97%"
            armortype = "Heavy"
            affects = "+WaterResistance4, +BlacksmithSuccess"
        ElseIf material = "Magnalium" Then
            requiredlevel = "55"
            bash = "2"
            slash = "8"
            pierce = "7"
            fist = "4"
            exotic = "7"
            weight = "4 Stones"
            value = "+20 Dover"
            durability = "33:98%"
            armortype = "Heavy"
            affects = "+Fire2"
        ElseIf material = "Alnico" Then
            requiredlevel = "61"
            bash = "6"
            slash = "6"
            pierce = "2"
            fist = "6"
            exotic = "10"
            weight = "4 Stones"
            value = "+65 Vern"
            durability = "65:96%"
            armortype = "Heavy"
            affects = "+Earth8, -BlacksmithSuccess"
        ElseIf material = "Potassium" Then
            requiredlevel = "62"
            bash = "10"
            slash = "5"
            pierce = "8"
            fist = "7"
            exotic = "1"
            weight = "2 Stones"
            value = "+30 Vern"
            durability = "80:90%"
            armortype = "Heavy"
            affects = "-AirResistance4, -WaterResistance10, +Earth4"
        ElseIf material = "Iron" Then
            requiredlevel = "0"
            bash = "1"
            slash = "1"
            pierce = "1"
            fist = "2"
            exotic = "0"
            weight = "7 Stones"
            value = "+22 Vern"
            durability = "30:95%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Steel" Then
            requiredlevel = "5"
            bash = "2"
            slash = "1"
            pierce = "1"
            fist = "1"
            exotic = "0"
            weight = "6 Stones"
            value = "+8 Vern"
            durability = "25:98%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Chromoly" Then
            requiredlevel = "15"
            bash = "3"
            slash = "1"
            pierce = "2"
            fist = "1"
            exotic = "0"
            weight = "5 Stones"
            value = "+18 Vern"
            durability = "10:99%"
            armortype = "Heavy"
            affects = "-WaterResistance2"
        ElseIf material = "Invar" Then
            requiredlevel = "16"
            bash = "2"
            slash = "2"
            pierce = "3"
            fist = "0"
            exotic = "0"
            weight = "2 Stones"
            value = "+21 Vern"
            durability = "40:97%"
            armortype = "Heavy"
            affects = "+Earth2, +FireResistance4"
        ElseIf material = "Cobalt" Then
            requiredlevel = "20"
            bash = "1"
            slash = "3"
            pierce = "0"
            fist = "4"
            exotic = "2"
            weight = "7 Stones"
            value = "+3 Vern"
            durability = "50:80%"
            armortype = "Heavy"
            affects = "+BlacksmithSuccess"
        ElseIf material = "Stellite" Then
            requiredlevel = "25"
            bash = "0"
            slash = "1"
            pierce = "3"
            fist = "6"
            exotic = "2"
            weight = "6 Stones"
            value = "+29 Vern"
            durability = "35:50%"
            armortype = "Heavy"
            affects = "-BlacksmithSuccess"
        ElseIf material = "Vitallium" Then
            requiredlevel = "20"
            bash = "2"
            slash = "2"
            pierce = "2"
            fist = "2"
            exotic = "2"
            weight = "6 Stones"
            value = "+23 Vern"
            durability = "25:72%"
            armortype = "Heavy"
            affects = "+WaterResistance1"
        ElseIf material = "Nickel" Then
            requiredlevel = "30"
            bash = "2"
            slash = "2"
            pierce = "4"
            fist = "4"
            exotic = "3"
            weight = "5 Stones"
            value = "+33 Vern"
            durability = "44:65%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Chromel" Then
            requiredlevel = "40"
            bash = "4"
            slash = "4"
            pierce = "4"
            fist = "4"
            exotic = "4"
            weight = "3 Stones"
            value = "+36 Vern"
            durability = "47:80%"
            armortype = "Heavy"
            affects = "+SubElementalResistance1"
        ElseIf material = "Nichrome" Then
            requiredlevel = "43"
            bash = "8"
            slash = "8"
            pierce = "2"
            fist = "2"
            exotic = "1"
            weight = "5 Stones"
            value = "+42 Vern"
            durability = "37:75%"
            armortype = "Heavy"
            affects = "+FireResistance5, +Fire5"
        ElseIf material = "Cupronickel" Then
            requiredlevel = "45"
            bash = "4"
            slash = "7"
            pierce = "7"
            fist = "3"
            exotic = "1"
            weight = "6 Stones"
            value = "+64 Vern"
            durability = "35:72%"
            armortype = "Heavy"
            affects = "+WaterResistance3"
        ElseIf material = "Copper" Then
            requiredlevel = "0"
            bash = "0"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "0"
            weight = "5 Stones"
            value = "+13 Vern"
            durability = "26:30%"
            armortype = "Heavy"
            affects = "+AirResistance2"
        ElseIf material = "Billon" Then
            requiredlevel = "18"
            bash = "3"
            slash = "3"
            pierce = "2"
            fist = "1"
            exotic = "0"
            weight = "8 Stones"
            value = "+8 Dover"
            durability = "18:44%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Brass" Then
            requiredlevel = "5"
            bash = "1"
            slash = "0"
            pierce = "2"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+4 Vern"
            durability = "22:22%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Tombac" Then
            requiredlevel = "2"
            bash = "0"
            slash = "1"
            pierce = "1"
            fist = "3"
            exotic = "0"
            weight = "3 Stones"
            value = "+35 Vern"
            durability = "27:80%"
            armortype = "Heavy"
            affects = "+ArmorPiercing"
        ElseIf material = "Bronze" Then
            requiredlevel = "19"
            bash = "3"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "2"
            weight = "2 Stones"
            value = "+36 Vern"
            durability = "31:70%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Hepatizon" Then
            requiredlevel = "33"
            bash = "0"
            slash = "4"
            pierce = "4"
            fist = "6"
            exotic = "2"
            weight = "5 Stones"
            value = "+15 Dover"
            durability = "33:77%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Shakudo" Then
            requiredlevel = "36"
            bash = "9"
            slash = "9"
            pierce = "0"
            fist = "0"
            exotic = "0"
            weight = "4 Stones"
            value = "+42 Vern"
            durability = "25:67%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Tumbaga" Then
            requiredlevel = "39"
            bash = "10"
            slash = "4"
            pierce = "3"
            fist = "0"
            exotic = "2"
            weight = "6 Stones"
            value = "+35 Vern"
            durability = "44:78%"
            armortype = "Heavy"
            affects = "-PoisonResistance3"
        ElseIf material = "Zinc" Then
            requiredlevel = "18"
            bash = "1"
            slash = "2"
            pierce = "3"
            fist = "0"
            exotic = "3"
            weight = "2 Stones"
            value = "+21 Vern"
            durability = "14:88%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Gallium" Then
            requiredlevel = "22"
            bash = "2"
            slash = "0"
            pierce = "3"
            fist = "5"
            exotic = "1"
            weight = "3 Stones"
            value = "+25 Vern"
            durability = "23:81%"
            armortype = "Heavy"
            affects = "-FireResistance6, +WaterResistance13"
        ElseIf material = "Zirconium" Then
            requiredlevel = "27"
            bash = "1"
            slash = "0"
            pierce = "0"
            fist = "9"
            exotic = "3"
            weight = "4 Stones"
            value = "+28 Vern"
            durability = "18:65%"
            armortype = "Heavy"
            affects = "+EarthResistance4, +PoisonResistance2"
        ElseIf material = "Silver" Then
            requiredlevel = "40"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "0"
            weight = "6 Stones"
            value = "+3 Dover"
            durability = "22:78%"
            armortype = "Heavy"
            affects = "-AirResistance3, +Air5, -EarthResistance3, +Earth3"
        ElseIf material = "Indium" Then
            requiredlevel = "47"
            bash = "4"
            slash = "6"
            pierce = "5"
            fist = "8"
            exotic = "0"
            weight = "5 Stones"
            value = "+80 Vern"
            durability = "32:66%"
            armortype = "Heavy"
            affects = "+2SongPotency"
        ElseIf material = "Tin" Then
            requiredlevel = "20"
            bash = "5"
            slash = "1"
            pierce = "1"
            fist = "1"
            exotic = "2"
            weight = "2 Stones"
            value = "+16 Vern"
            durability = "37:15%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Gold" Then
            requiredlevel = "50"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "5"
            weight = "3 Stones"
            value = "+40 Dover"
            durability = "50:30%"
            armortype = "Heavy"
            affects = "+Poison2"
        ElseIf material = "Mercury" Then
            requiredlevel = "51"
            bash = "0"
            slash = "20"
            pierce = "2"
            fist = "3"
            exotic = "0"
            weight = "1 Stones"
            value = "+2 Dover"
            durability = "41:100%"
            armortype = "Heavy"
            affects = "+FireResistance8, +WaterResistance8, +Poison5"
        ElseIf material = "Lead" Then
            requiredlevel = "55"
            bash = "8"
            slash = "8"
            pierce = "8"
            fist = "1"
            exotic = "2"
            weight = "7 Stones"
            value = "+56 Vern"
            durability = "32:78%"
            armortype = "Heavy"
            affects = "+Poison4"
        ElseIf material = "Bismuth" Then
            requiredlevel = "38"
            bash = "3"
            slash = "8"
            pierce = "6"
            fist = "0"
            exotic = "1"
            weight = "6 Stones"
            value = "+34 Vern"
            durability = "32:78%"
            armortype = "Heavy"
            affects = "+Poison7"
        ElseIf material = "Uranium" Then
            requiredlevel = "50"
            bash = "5"
            slash = "5"
            pierce = "10"
            fist = "0"
            exotic = "5"
            weight = "4 Stones"
            value = "+51 Vern"
            durability = "23:88%"
            armortype = "Heavy"
            affects = "+Poison8, +Earth8, -PoisonResistance8"
        ElseIf material = "Agate" Then
            requiredlevel = "55"
            bash = "3"
            slash = "8"
            pierce = "9"
            fist = "2"
            exotic = "5"
            weight = "2 Stones"
            value = "+55 Vern"
            durability = "66:80%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Chrysoberyl" Then
            requiredlevel = "59"
            bash = "3"
            slash = "8"
            pierce = "9"
            fist = "2"
            exotic = "5"
            weight = "2 Stones"
            value = "+4 Dover"
            durability = "67:70%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Alexandrite" Then
            requiredlevel = "61"
            bash = "6"
            slash = "8"
            pierce = "6"
            fist = "0"
            exotic = "10"
            weight = "3 Stones"
            value = "+99 Vern"
            durability = "61:71%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Cymophane" Then
            requiredlevel = "68"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "14"
            weight = "2 Stones"
            value = "+3 Dover"
            durability = "62:75%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Emerald" Then
            requiredlevel = "75"
            bash = "10"
            slash = "10"
            pierce = "8"
            fist = "8"
            exotic = "1"
            weight = "4 Stones"
            value = "+1 Dover"
            durability = "63:72%"
            armortype = "Heavy"
            affects = "+Poison5, +PoisonResistance5"
        ElseIf material = "Bixbite" Then
            requiredlevel = "65"
            bash = "12"
            slash = "8"
            pierce = "6"
            fist = "6"
            exotic = "0"
            weight = "4 Stones"
            value = "+4 Dover"
            durability = "63:79%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Aquamarine" Then
            requiredlevel = "71"
            bash = "5"
            slash = "5"
            pierce = "10"
            fist = "5"
            exotic = "10"
            weight = "5 Stones"
            value = "+44 Vern"
            durability = "68:68%"
            armortype = "Heavy"
            affects = "+Water5, +WaterResistance5"
        ElseIf material = "Morganite" Then
            requiredlevel = "81"
            bash = "10"
            slash = "10"
            pierce = "10"
            fist = "10"
            exotic = "0"
            weight = "2 Stones"
            value = "+80 Vern"
            durability = "62:70%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Goshenite" Then
            requiredlevel = "88"
            bash = "8"
            slash = "8"
            pierce = "8"
            fist = "10"
            exotic = "10"
            weight = "3 Stones"
            value = "+16 Vern"
            durability = "66:72%"
            armortype = "Heavy"
            affects = "+SubFireResistance3"
        ElseIf material = "Golden Beryl" Then
            requiredlevel = "84"
            bash = "5"
            slash = "8"
            pierce = "10"
            fist = "10"
            exotic = "10"
            weight = "6 Stones"
            value = "+1 Sovern"
            durability = "66:72%"
            armortype = "Heavy"
            affects = "+SubFireResistance3"
        ElseIf material = "Heliodor" Then
            requiredlevel = "63"
            bash = "6"
            slash = "5"
            pierce = "8"
            fist = "5"
            exotic = "7"
            weight = "5 Stones"
            value = "+90 Vern"
            durability = "64:71%"
            armortype = "Heavy"
            affects = "+SubWaterResistance4"
        ElseIf material = "Maxixe" Then
            requiredlevel = "57"
            bash = "7"
            slash = "7"
            pierce = "7"
            fist = "7"
            exotic = "6"
            weight = "7 Stones"
            value = "+56 Vern"
            durability = "65:80%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Chrysocolla" Then
            requiredlevel = "58"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "9"
            exotic = "5"
            weight = "8 Stones"
            value = "+58 Vern"
            durability = "61:64%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Chrysoprase" Then
            requiredlevel = "61"
            bash = "15"
            slash = "0"
            pierce = "15"
            fist = "0"
            exotic = "0"
            weight = "9 Stones"
            value = "+62 Vern"
            durability = "68:61%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Diamond" Then
            requiredlevel = "90"
            bash = "9"
            slash = "9"
            pierce = "9"
            fist = "9"
            exotic = "9"
            weight = "10 Stones"
            value = "+12 Sovern"
            durability = "75:100%"
            armortype = "Heavy"
            affects = "ArmorPiercing"
        ElseIf material = "Feldspar" Then
            requiredlevel = "71"
            bash = "7"
            slash = "7"
            pierce = "6"
            fist = "10"
            exotic = "0"
            weight = "9 Stones"
            value = "+75 Vern"
            durability = "71:80%"
            armortype = "Heavy"
            affects = "+FireResistance3, +Fire3"
        ElseIf material = "Garnet" Then
            requiredlevel = "73"
            bash = "6"
            slash = "6"
            pierce = "7"
            fist = "8"
            exotic = "9"
            weight = "6 Stones"
            value = "+70 Vern"
            durability = "38:71%"
            armortype = "Heavy"
            affects = "+FireResistance5, +Poison5"
        ElseIf material = "Hematite" Then
            requiredlevel = "80"
            bash = "15"
            slash = "15"
            pierce = "5"
            fist = "5"
            exotic = "0"
            weight = "6 Stones"
            value = "+1 Dover"
            durability = "22:60%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Jade" Then
            requiredlevel = "75"
            bash = "8"
            slash = "8"
            pierce = "7"
            fist = "7"
            exotic = "5"
            weight = "4 Stones"
            value = "+80 Vern"
            durability = "32:50%"
            armortype = "Heavy"
            affects = "+Poison3, +PoisonResistance8"
        ElseIf material = "Jasper" Then
            requiredlevel = "75"
            bash = "7"
            slash = "9"
            pierce = "7"
            fist = "9"
            exotic = "2"
            weight = "2 Stones"
            value = "+88 Vern"
            durability = "41:51%"
            armortype = "Heavy"
            affects = "+SubAirResistance5"
        ElseIf material = "Kunzite" Then
            requiredlevel = "90"
            bash = "6"
            slash = "6"
            pierce = "8"
            fist = "9"
            exotic = "10"
            weight = "3 Stones"
            value = "+94 Vern"
            durability = "43:52%"
            armortype = "Heavy"
            affects = "+SubFire4"
        ElseIf material = "Lapis" Then
            requiredlevel = "75"
            bash = "9"
            slash = "7"
            pierce = "4"
            fist = "10"
            exotic = "1"
            weight = "4 Stones"
            value = "+60 Vern"
            durability = "42:58%"
            armortype = "Heavy"
            affects = "+SubWaterResistance7, +SubWater3"
        ElseIf material = "Malachite" Then
            requiredlevel = "75"
            bash = "4"
            slash = "7"
            pierce = "10"
            fist = "5"
            exotic = "5"
            weight = "5 Stones"
            value = "+56 Vern"
            durability = "44:51%"
            armortype = "Heavy"
            affects = "+SubPoisonResistance3"
        ElseIf material = "Obsidian" Then
            requiredlevel = "88"
            bash = "12"
            slash = "12"
            pierce = "12"
            fist = "4"
            exotic = "4"
            weight = "8 Stones"
            value = "+88 Vern"
            durability = "32:48%"
            armortype = "Heavy"
            affects = "+ElementalResistance1, -SubElementalResistance5"
        ElseIf material = "Olivine" Then
            requiredlevel = "91"
            bash = "8"
            slash = "5"
            pierce = "13"
            fist = "12"
            exotic = "17"
            weight = "7 Stones"
            value = "+93 Vern"
            durability = "26:50%"
            armortype = "Heavy"
            affects = "+SubElementalResistance4"
        ElseIf material = "Pyrite" Then
            requiredlevel = "92"
            bash = "11"
            slash = "7"
            pierce = "8"
            fist = "11"
            exotic = "8"
            weight = "2 Stones"
            value = "+1 Dover"
            durability = "23:49%"
            armortype = "Heavy"
            affects = "+FireResistance8, +SubFireResistance8"
        ElseIf material = "Citrine" Then
            requiredlevel = "75"
            bash = "8"
            slash = "8"
            pierce = "8"
            fist = "9"
            exotic = "2"
            weight = "1 Stones"
            value = "+1 Dover"
            durability = "21:38%"
            armortype = "Heavy"
            affects = "+AirResistance5, +SubAirResistance5"
        ElseIf material = "Ruby" Then
            requiredlevel = "75"
            bash = "9"
            slash = "6"
            pierce = "7"
            fist = "4"
            exotic = "9"
            weight = "4 Stones"
            value = "+1 Dover"
            durability = "38:44%"
            armortype = "Heavy"
            affects = "+FireResistance7, +Fire5"
        ElseIf material = "Sapphire" Then
            requiredlevel = "75"
            bash = "4"
            slash = "8"
            pierce = "9"
            fist = "5"
            exotic = "7"
            weight = "3 Stones"
            value = "+45 Vern"
            durability = "32:47%"
            armortype = "Heavy"
            affects = "+Water4"
        ElseIf material = "Sugilite" Then
            requiredlevel = "78"
            bash = "6"
            slash = "7"
            pierce = "10"
            fist = "8"
            exotic = "8"
            weight = "5 Stones"
            value = "+65 Vern"
            durability = "35:43%"
            armortype = "Heavy"
            affects = "+SpellPower15"
        ElseIf material = "Tanzanite" Then
            requiredlevel = "76"
            bash = "7"
            slash = "5"
            pierce = "9"
            fist = "10"
            exotic = "9"
            weight = "3 Stones"
            value = "+77 Vern"
            durability = "50:44%"
            armortype = "Heavy"
            affects = "+SpellPower7"
        ElseIf material = "Topaz" Then
            requiredlevel = "75"
            bash = "9"
            slash = "2"
            pierce = "8"
            fist = "7"
            exotic = "9"
            weight = "6 Stones"
            value = "+83 Vern"
            durability = "29:58%"
            armortype = "Heavy"
            affects = "+SubAir4"
        ElseIf material = "Turquoise" Then
            requiredlevel = "74"
            bash = "5"
            slash = "5"
            pierce = "10"
            fist = "7"
            exotic = "10"
            weight = "6 Stones"
            value = "+70 Vern"
            durability = "27:70%"
            armortype = "Heavy"
            affects = "+SkillPower2"
        ElseIf material = "Tourmaline" Then
            requiredlevel = "69"
            bash = "8"
            slash = "7"
            pierce = "7"
            fist = "10"
            exotic = "2"
            weight = "5 Stones"
            value = "+64 Vern"
            durability = "25:71%"
            armortype = "Heavy"
            affects = "+Earth5, -EarthRes5, +SubEarth5, -SubEarthRes5"
        ElseIf material = "Zircon" Then
            requiredlevel = "86"
            bash = "9"
            slash = "9"
            pierce = "9"
            fist = "9"
            exotic = "7"
            weight = "3 Stones"
            value = "+68 Vern"
            durability = "23:78%"
            armortype = "Heavy"
            affects = "+SpellPower7"
        ElseIf material = "Andalusite" Then
            requiredlevel = "83"
            bash = "7"
            slash = "7"
            pierce = "8"
            fist = "10"
            exotic = "8"
            weight = "2 Stones"
            value = "+3 Vern"
            durability = "27:77%"
            armortype = "Heavy"
            affects = "+SkillPower1, +ElementalResistance1"
        ElseIf material = "Benitoite" Then
            requiredlevel = "81"
            bash = "9"
            slash = "3"
            pierce = "9"
            fist = "9"
            exotic = "10"
            weight = "7 Stones"
            value = "+55 Dover"
            durability = "21:58%"
            armortype = "Heavy"
            affects = "+ArmorPiercing"
        ElseIf material = "Onyx" Then
            requiredlevel = "80"
            bash = "5"
            slash = "10"
            pierce = "10"
            fist = "10"
            exotic = "5"
            weight = "9 Stones"
            value = "+84 Vern"
            durability = "23:80%"
            armortype = "Heavy"
            affects = "+SkillPower15"
        ElseIf material = "Ammolite" Then
            requiredlevel = "84"
            bash = "8"
            slash = "13"
            pierce = "19"
            fist = "17"
            exotic = "5"
            weight = "7 Stones"
            value = "+25 Dover"
            durability = "25:82%"
            armortype = "Heavy"
            affects = "+ArmorPiercing, +Elemental&SubRes10"
        ElseIf material = "Coral" Then
            requiredlevel = "50"
            bash = "5"
            slash = "0"
            pierce = "5"
            fist = "5"
            exotic = "2"
            weight = "2 Stones"
            value = "+13 Vern"
            durability = "21:80%"
            armortype = "Heavy"
            affects = "+Water15,+EarthResistance7"
        ElseIf material = "Ivory" Then
            requiredlevel = "30"
            bash = "5"
            slash = "3"
            pierce = "2"
            fist = "3"
            exotic = "2"
            weight = "4 Stones"
            value = "+13 Dover"
            durability = "22:70%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Pearl" Then
            requiredlevel = "20"
            bash = "2"
            slash = "1"
            pierce = "3"
            fist = "3"
            exotic = "1"
            weight = "3 Stones"
            value = "+8 Dover"
            durability = "25:75%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Bone" Then
            requiredlevel = "10"
            bash = "1"
            slash = "1"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "1 Stones"
            value = "+2 Vern"
            durability = "20:30%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Lignite" Then
            requiredlevel = "50"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "0"
            weight = "2 Stones"
            value = "+8 Vern"
            durability = "18:28%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Platinum" Then
            requiredlevel = "50"
            bash = "0"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "5"
            weight = "8 Stones"
            value = "+4 Sovern"
            durability = "50:70%"
            armortype = "Heavy"
            affects = "+ArmorPiercing"
        ElseIf material = "Palladium" Then
            requiredlevel = "50"
            bash = "5"
            slash = "5"
            pierce = "0"
            fist = "5"
            exotic = "5"
            weight = "9 Stones"
            value = "+8 Sovern"
            durability = "52:71%"
            armortype = "Heavy"
            affects = "+SkillPower10"
        ElseIf material = "Glass" Then
            requiredlevel = "5"
            bash = "1"
            slash = "0"
            pierce = "1"
            fist = "2"
            exotic = "1"
            weight = "1 Stones"
            value = "+11 Vern"
            durability = "30:15%"
            armortype = "Heavy"
            affects = "+SpellPower3"
        ElseIf material = "Chestnut" Then
            requiredlevel = "13"
            bash = "2"
            slash = "2"
            pierce = "1"
            fist = "0"
            exotic = "1"
            weight = "4 Stones"
            value = "+16 Vern"
            durability = "30:15%"
            armortype = "Heavy"
            affects = "+SkillPower3"
        ElseIf material = "Basswood" Then
            requiredlevel = "19"
            bash = "2"
            slash = "0"
            pierce = "2"
            fist = "2"
            exotic = "1"
            weight = "4 Stones"
            value = "+18 Vern"
            durability = "30:15%"
            armortype = "Heavy"
            affects = "+SkillPower3"
        ElseIf material = "Dogwood" Then
            requiredlevel = "19"
            bash = "2"
            slash = "0"
            pierce = "2"
            fist = "2"
            exotic = "1"
            weight = "2 Stones"
            value = "+18 Vern"
            durability = "32:15%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Mahogany" Then
            requiredlevel = "21"
            bash = "0"
            slash = "0"
            pierce = "4"
            fist = "5"
            exotic = "1"
            weight = "4 Stones"
            value = "+3 Dover"
            durability = "33:15%"
            armortype = "Heavy"
            affects = "+ArmorPiercing"
        ElseIf material = "Maple" Then
            requiredlevel = "14"
            bash = "2"
            slash = "2"
            pierce = "0"
            fist = "2"
            exotic = "1"
            weight = "2 Stones"
            value = "+18 Vern"
            durability = "31:18%"
            armortype = "Heavy"
            affects = "+Earth2, +EarthResistance1"
        ElseIf material = "Red Oak" Then
            requiredlevel = "0"
            bash = "0"
            slash = "2"
            pierce = "2"
            fist = "1"
            exotic = "0"
            weight = "4 Stones"
            value = "+8 Vern"
            durability = "30:14%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Rosewood" Then
            requiredlevel = "20"
            bash = "1"
            slash = "3"
            pierce = "2"
            fist = "2"
            exotic = "2"
            weight = "3 Stones"
            value = "+2 Dover"
            durability = "20:13%"
            armortype = "Heavy"
            affects = "+ProjectileDamage5"
        ElseIf material = "Bamboo" Then
            requiredlevel = "25"
            bash = "2"
            slash = "2"
            pierce = "1"
            fist = "5"
            exotic = "2"
            weight = "2 Stones"
            value = "+22 Vern"
            durability = "20:28%"
            armortype = "Heavy"
            affects = ""
        ElseIf material = "Wool" Then
            requiredlevel = "0"
            bash = "1"
            slash = "1"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "1 Stone"
            value = "+2 Vern"
            durability = "15:10%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Cotton" Then
            requiredlevel = "0"
            bash = "1"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "0"
            weight = "1 Stone"
            value = "+2 Vern"
            durability = "15:10%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Silk" Then
            requiredlevel = "20"
            bash = "2"
            slash = "2"
            pierce = "2"
            fist = "2"
            exotic = "2"
            weight = "0 Stones"
            value = "+40 Dover"
            durability = "15:10%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Spidersilk" Then
            requiredlevel = "60"
            bash = "4"
            slash = "4"
            pierce = "4"
            fist = "4"
            exotic = "4"
            weight = "1 Stone"
            value = "+1 Sovern"
            durability = "15:10%"
            armortype = "Light"
            affects = "+SpellPower4"
        ElseIf material = "Linen" Then
            requiredlevel = "0"
            bash = "1"
            slash = "1"
            pierce = "2"
            fist = "1"
            exotic = "0"
            weight = "1 Stone"
            value = "+4 Vern"
            durability = "15:11%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Ramie" Then
            requiredlevel = "25"
            bash = "3"
            slash = "1"
            pierce = "3"
            fist = "3"
            exotic = "2"
            weight = "1 Stone"
            value = "+25 Vern"
            durability = "15:13%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Hemp" Then
            requiredlevel = "30"
            bash = "3"
            slash = "3"
            pierce = "3"
            fist = "3"
            exotic = "3"
            weight = "1 Stone"
            value = "+2 Vern"
            durability = "15:18%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Nettle" Then
            requiredlevel = "65"
            bash = "7"
            slash = "7"
            pierce = "7"
            fist = "7"
            exotic = "4"
            weight = "1 Stone"
            value = "+88 Vern"
            durability = "15:22%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Raffia" Then
            requiredlevel = "75"
            bash = "8"
            slash = "5"
            pierce = "7"
            fist = "6"
            exotic = "10"
            weight = "1 Stone"
            value = "+87 Vern"
            durability = "15:21%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Jute" Then
            requiredlevel = "80"
            bash = "10"
            slash = "10"
            pierce = "10"
            fist = "10"
            exotic = "0"
            weight = "1 Stone"
            value = "+5 Dover"
            durability = "15:10%"
            armortype = "Light"
            affects = "+SpellPower3"
        ElseIf material = "Barkcloth" Then
            requiredlevel = "85"
            bash = "9"
            slash = "11"
            pierce = "8"
            fist = "8"
            exotic = "4"
            weight = "1 Stone"
            value = "+40 Vern"
            durability = "15:18%"
            armortype = "Light"
            affects = "+SpellPower2"
        ElseIf material = "Batiste" Then
            requiredlevel = "50"
            bash = "4"
            slash = "8"
            pierce = "12"
            fist = "12"
            exotic = "2"
            weight = "1 Stone"
            value = "+3 Vern"
            durability = "15:16%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Bombazine" Then
            requiredlevel = "45"
            bash = "5"
            slash = "8"
            pierce = "9"
            fist = "6"
            exotic = "6"
            weight = "1 Stone"
            value = "+6 Vern"
            durability = "15:17%"
            armortype = "Light"
            affects = "+SkillPower2"
        ElseIf material = "Burlap" Then
            requiredlevel = "15"
            bash = "3"
            slash = "4"
            pierce = "2"
            fist = "1"
            exotic = "1"
            weight = "1 Stone"
            value = "+18 Vern"
            durability = "15:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Buckram" Then
            requiredlevel = "20"
            bash = "2"
            slash = "2"
            pierce = "2"
            fist = "4"
            exotic = "0"
            weight = "1 Stone"
            value = "+5 Vern"
            durability = "15:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Canvas" Then
            requiredlevel = "22"
            bash = "2"
            slash = "3"
            pierce = "2"
            fist = "5"
            exotic = "0"
            weight = "1 Stone"
            value = "+18 Vern"
            durability = "20:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Chino" Then
            requiredlevel = "26"
            bash = "3"
            slash = "3"
            pierce = "3"
            fist = "4"
            exotic = "0"
            weight = "1 Stone"
            value = "+22 Vern"
            durability = "18:20%"
            armortype = "Light"
            affects = "+Perception4"
        ElseIf material = "Crape" Then
            requiredlevel = "28"
            bash = "4"
            slash = "3"
            pierce = "3"
            fist = "4"
            exotic = "0"
            weight = "1 Stone"
            value = "+20 Dover"
            durability = "19:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Harris Tweed" Then
            requiredlevel = "32"
            bash = "4"
            slash = "4"
            pierce = "4"
            fist = "4"
            exotic = "0"
            weight = "1 Stone"
            value = "+18 Dover"
            durability = "22:20%"
            armortype = "Light"
            affects = "+Diplomacy3"
        ElseIf material = "Hodden" Then
            requiredlevel = "34"
            bash = "4"
            slash = "4"
            pierce = "4"
            fist = "4"
            exotic = "1"
            weight = "1 Stone"
            value = "+19 Dover"
            durability = "20:20%"
            armortype = "Light"
            affects = "+Diplomacy4"
        ElseIf material = "Serge" Then
            requiredlevel = "36"
            bash = "4"
            slash = "5"
            pierce = "4"
            fist = "4"
            exotic = "1"
            weight = "1 Stone"
            value = "+45 Dover"
            durability = "25:20%"
            armortype = "Light"
            affects = "+SpellPower6"
        ElseIf material = "Moleskin" Then
            requiredlevel = "38"
            bash = "5"
            slash = "4"
            pierce = "5"
            fist = "4"
            exotic = "1"
            weight = "1 Stone"
            value = "+8 Vern"
            durability = "20:20%"
            armortype = "Light"
            affects = "+EarthResistance4"
        ElseIf material = "Flannel" Then
            requiredlevel = "42"
            bash = "5"
            slash = "5"
            pierce = "5"
            fist = "5"
            exotic = "2"
            weight = "1 Stone"
            value = "+18 Vern"
            durability = "18:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Camlet" Then
            requiredlevel = "44"
            bash = "5"
            slash = "6"
            pierce = "5"
            fist = "4"
            exotic = "3"
            weight = "1 Stone"
            value = "+33 Vern"
            durability = "19:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Brocade" Then
            requiredlevel = "46"
            bash = "6"
            slash = "5"
            pierce = "6"
            fist = "3"
            exotic = "5"
            weight = "1 Stone"
            value = "+18 Vern"
            durability = "20:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Damask" Then
            requiredlevel = "48"
            bash = "6"
            slash = "6"
            pierce = "5"
            fist = "4"
            exotic = "5"
            weight = "1 Stone"
            value = "+17 Dover"
            durability = "25:20%"
            armortype = "Light"
            affects = "+Diplomacy6"
        ElseIf material = "Polar Fleece" Then
            requiredlevel = "52"
            bash = "7"
            slash = "6"
            pierce = "6"
            fist = "3"
            exotic = "6"
            weight = "1 Stone"
            value = "+48 Vern"
            durability = "23:22%"
            armortype = "Light"
            affects = "+WaterResistance5, +Water3"
        ElseIf material = "Velvet" Then
            requiredlevel = "54"
            bash = "4"
            slash = "7"
            pierce = "7"
            fist = "5"
            exotic = "6"
            weight = "1 Stone"
            value = "+51 Dover"
            durability = "60:10%"
            armortype = "Light"
            affects = "+Perception10"
        ElseIf material = "Zibeline" Then
            requiredlevel = "56"
            bash = "7"
            slash = "7"
            pierce = "7"
            fist = "5"
            exotic = "5"
            weight = "1 Stone"
            value = "+3 Dover"
            durability = "21:15%"
            armortype = "Light"
            affects = "+EarthResistance3"
        ElseIf material = "Felt" Then
            requiredlevel = "58"
            bash = "6"
            slash = "6"
            pierce = "7"
            fist = "7"
            exotic = "7"
            weight = "1 Stone"
            value = "+28 Vern"
            durability = "18:20%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Tulle" Then
            requiredlevel = "18"
            bash = "1"
            slash = "3"
            pierce = "2"
            fist = "1"
            exotic = "2"
            weight = "1 Stone"
            value = "+10 Vern"
            durability = "14:14%"
            armortype = "Light"
            affects = ""
        ElseIf material = "Fur" Then
            requiredlevel = "0"
            bash = "1"
            slash = "2"
            pierce = "0"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+14 Vern"
            durability = "30:30%"
            armortype = "Medium"
            affects = ""
        ElseIf material = "Light Leather" Then
            requiredlevel = "1"
            bash = "0"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+15 Vern"
            durability = "30:31%"
            armortype = "Medium"
            affects = ""
        ElseIf material = "Medium Leather" Then
            requiredlevel = "5"
            bash = "1"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+18 Vern"
            durability = "30:33%"
            armortype = "Medium"
            affects = ""
        ElseIf material = "Heavy Leather" Then
            requiredlevel = "10"
            bash = "2"
            slash = "2"
            pierce = "1"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+38 Vern"
            durability = "30:35%"
            armortype = "Medium"
            affects = ""
        ElseIf material = "Aniline Leather" Then
            requiredlevel = "15"
            bash = "2"
            slash = "2"
            pierce = "2"
            fist = "1"
            exotic = "1"
            weight = "2 Stones"
            value = "+15 Dover"
            durability = "45:32%"
            armortype = "Medium"
            affects = "+Stealth4"
        ElseIf material = "Boiled Leather" Then
            requiredlevel = "30"
            bash = "3"
            slash = "3"
            pierce = "2"
            fist = "3"
            exotic = "2"
            weight = "2 Stones"
            value = "+1 Dover"
            durability = "30:35%"
            armortype = "Medium"
            affects = "-Stealth2"
        ElseIf material = "Shell Cordovan" Then
            requiredlevel = "35"
            bash = "4"
            slash = "4"
            pierce = "3"
            fist = "4"
            exotic = "3"
            weight = "2 Stones"
            value = "+2 Dover"
            durability = "30:35%"
            armortype = "Medium"
            affects = "-Stealth1"
        ElseIf material = "Nappa Leather" Then
            requiredlevel = "45"
            bash = "4"
            slash = "5"
            pierce = "4"
            fist = "3"
            exotic = "4"
            weight = "2 Stones"
            value = "+3 Dover"
            durability = "40:30%"
            armortype = "Medium"
            affects = "+Perception2, +Air4, +Water1, +Poison1"
        ElseIf material = "Nubuck" Then
            requiredlevel = "55"
            bash = "5"
            slash = "6"
            pierce = "6"
            fist = "6"
            exotic = "5"
            weight = "2 Stones"
            value = "+5 Dover"
            durability = "44:34%"
            armortype = "Medium"
            affects = "+Diplomacy3, +EarthResistance2, +Earth1"
        ElseIf material = "Shagreen" Then
            requiredlevel = "65"
            bash = "7"
            slash = "7"
            pierce = "6"
            fist = "7"
            exotic = "7"
            weight = "2 Stones"
            value = "+33 Dover"
            durability = "45:36%"
            armortype = "Medium"
            affects = "+Stealth3, +PoisonResistance6, +Poison3"
        ElseIf material = "Suede" Then
            requiredlevel = "75"
            bash = "8"
            slash = "6"
            pierce = "8"
            fist = "6"
            exotic = "7"
            weight = "2 Stones"
            value = "+15 Dover"
            durability = "40:30%"
            armortype = "Medium"
            affects = "+SkillPower3, +Poison4"
        ElseIf material = "Sequin" Then
            requiredlevel = "15"
            bash = "0"
            slash = "0"
            pierce = "0"
            fist = "5"
            exotic = "0"
            weight = "1 Stone"
            value = "+51 Dover"
            durability = "50:50%"
            armortype = "Exotic"
            affects = "+SubElementalResistance1"
        ElseIf material = "Millefiori" Then
            requiredlevel = "5"
            bash = "0"
            slash = "0"
            pierce = "5"
            fist = "0"
            exotic = "0"
            weight = "1 Stone"
            value = "+1 Sovern"
            durability = "50:50%"
            armortype = "Exotic"
            affects = "+SubElementalAll1"
        ElseIf material = "Chevron Bead" Then
            requiredlevel = "0"
            bash = "0"
            slash = "5"
            pierce = "0"
            fist = "0"
            exotic = "0"
            weight = "1 Stone"
            value = "+1 Vern"
            durability = "50:50%"
            armortype = "Exotic"
            affects = ""
        ElseIf material = "Cinnabar Bead" Then
            requiredlevel = "0"
            bash = "5"
            slash = "0"
            pierce = "0"
            fist = "0"
            exotic = "0"
            weight = "1 Stone"
            value = "+2 Dover"
            durability = "50:50%"
            armortype = "Exotic"
            affects = ""
        ElseIf material = "Dragon Scale" Then
            requiredlevel = "90"
            bash = "9"
            slash = "9"
            pierce = "9"
            fist = "9"
            exotic = "9"
            weight = "8 Stones"
            value = "+20 Sovern"
            durability = "100:99%"
            armortype = "Exotic"
            affects = "+IncreaseCraftBy1IfUnderExcellent"
        ElseIf material = "Wyrm Scale" Then
            requiredlevel = "100"
            bash = "20"
            slash = "20"
            pierce = "20"
            fist = "20"
            exotic = "20"
            weight = "9 Stones"
            value = "+35 Sovern"
            durability = "100:100%"
            armortype = "Exotic"
            affects = "+DurabilityRegeneration"
        ElseIf material = "Chitin" Then
            requiredlevel = "100"
            bash = "20"
            slash = "20"
            pierce = "20"
            fist = "20"
            exotic = "20"
            weight = "10 Stones"
            value = "+5 Dover"
            durability = "80:100%"
            armortype = "Exotic"
            affects = "+DurabilityRegeneration, +EarthResistance5"
        ElseIf material = "Flesh" Then
            requiredlevel = "100"
            bash = "10"
            slash = "10"
            pierce = "10"
            fist = "10"
            exotic = "10"
            weight = "0 Stones"
            value = "+0 Vern"
            durability = "20:20%"
            armortype = "Exotic"
            affects = "+DurabilityRegeneration, +SubEarthResistance5"
        Else
        End If
        Return 0
    End Function
    Public Function comworth(ByVal Weapontypeworth As String, ByVal value As String) As String
        Dim ValueTemp As String = ""
        Dim Tempmid As String = "", valuenum As String = ""
        If InStr(value, "x") = 0 Then
            Tempmid = Mid(Weapontypeworth, Weapontypeworth.Length - 3, 4)
            valuenum = Replace(Replace(Replace(value, " Vern", ""), " Dover", ""), " Sovern", "")
            ValueTemp = Mid(value, value.Length - 3, 4)
        Else
            ValueTemp = value
        End If
        If value = "0" Then
            ValueTemp = "No value"
        ElseIf value = "1/4 Value" Or value = "1/4" Then
            If Tempmid = "Vern" Then
                Tempmid = " Vern"
            ElseIf Tempmid = "over" Then
                Tempmid = " Dover"
            ElseIf Tempmid = "vern" Then
                Tempmid = " Sovern"
            End If
            ValueTemp = Str(Val(Mid(Weapontypeworth, 1, Weapontypeworth.Length - 2)) / 4) + Tempmid
        ElseIf value = "1/2 Value" Or value = "1/2" Then
            If Tempmid = "Vern" Then
                Tempmid = " Vern"
            ElseIf Tempmid = "over" Then
                Tempmid = " Dover"
            ElseIf Tempmid = "vern" Then
                Tempmid = " Sovern"
            End If
            ValueTemp = Str(Val(Mid(Weapontypeworth, 1, Weapontypeworth.Length - 2)) / 2) + Tempmid
        ElseIf value = "3/4 Value" Or value = "3/4" Then
            If Tempmid = "Vern" Then
                Tempmid = " Vern"
            ElseIf Tempmid = "over" Then
                Tempmid = " Dover"
            ElseIf Tempmid = "vern" Then
                Tempmid = " Sovern"
            End If
            ValueTemp = Str(3 * Val(Mid(Weapontypeworth, 1, Weapontypeworth.Length - 2)) / 4) + Tempmid
        Else
            If ValueTemp = "Vern" Then
                If Tempmid = "Vern" Then
                    ValueTemp = Str(Val(valuenum) + Val(Weapontypeworth)) + " Vern"
                ElseIf Tempmid = "over" Then
                    ValueTemp = Weapontypeworth + ", " + valuenum + " Vern"
                ElseIf Tempmid = "vern" Then
                    ValueTemp = Weapontypeworth + ", " + valuenum + " Vern"
                End If
            ElseIf ValueTemp = "over" Then
                If Tempmid = "Vern" Then
                    ValueTemp = valuenum + " Dover, " + Weapontypeworth
                ElseIf Tempmid = "over" Then
                    ValueTemp = Str(Val(valuenum) + Val(Weapontypeworth)) + " Dover"
                ElseIf Tempmid = "vern" Then
                    ValueTemp = Weapontypeworth + ", " + valuenum + " Dover"
                End If
            ElseIf ValueTemp = "vern" Then
                If Tempmid = "Vern" Then
                    ValueTemp = valuenum + " Sovern, " + Weapontypeworth
                ElseIf Tempmid = "over" Then
                    ValueTemp = valuenum + " Sovern, " + Weapontypeworth
                ElseIf Tempmid = "vern" Then
                    ValueTemp = Str(Val(valuenum) + Val(Weapontypeworth)) + " Sovern"
                End If
            End If
        End If
        Return ValueTemp
    End Function
    Public Function GenerateRandomItem(ByVal RandomString As String) As String
        Dim iITEMT As String = "", iITEMC As String = "", iITEMN As String = "", iSHORT As String = "", iLONGD As String = "", iLOOKD As String = "", iEQUIP As String = "", iPARID As String = "", iWORTH As String = ""
        Dim tmp0 As Integer, Type As String = ""
        Dim Rational_Archetype As String = "", Rational_Sentience As String = "", Rational_Weight As String = "", Rational_Level As String = ""
        Dim Lucky_Level As String = "", Lucky_Class As String = ""
        Dim TEMType As String = "", TEMType2 As String = "", TEMMaterial As String = "", TEMCraft As String = "", TEMQuality As String = ""
        Dim TEMPrefix As String = "", TEMSuffix As String = "", daprefix As String = "", dasuffix As String = ""
        Dim sr As New Random
        For tmp0 = 1 To Len(RandomString) Step 1
            If Type = "" Then
                If Mid(RandomString, tmp0, 1) = "1" Then
                    Type = "Weapon"
                ElseIf Mid(RandomString, tmp0, 1) = "2" Then
                    Type = "Armor"
                ElseIf Mid(RandomString, tmp0, 1) = "3" Then
                    Type = "Misc"
                ElseIf Mid(RandomString, tmp0, 1) = "?" Then
                    Dim RandomItemType As Short = sr.Next(1, 3)
                    If RandomItemType = 1 Then
                        RandomString = "[2,1,1,1,1,1,1,?,?,?,?,?,?]"
                    ElseIf RandomItemType = 2 Then
                        RandomString = "[2,1,1,1,1,1,1,?,?,?,?,?,?]"
                    ElseIf RandomItemType = 3 Then
                        RandomString = "[3,1,1,1,1,?]"
                    End If
                End If
            ElseIf Type = "Weapon" Then
                If Rational_Archetype = "" Then
                    If Mid(RandomString, tmp0, 1) = "1" Then
                        Rational_Archetype = "1"
                    ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                        Rational_Archetype = "0"
                    End If
                Else
                    If Rational_Sentience = "" Then
                        If Mid(RandomString, tmp0, 1) = "1" Then
                            Rational_Sentience = "1"
                        ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                            Rational_Sentience = "0"
                        End If
                    Else
                        If Rational_Weight = "" Then
                            If Mid(RandomString, tmp0, 1) = "1" Then
                                Rational_Weight = "1"
                            ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                                Rational_Weight = "0"
                            End If
                        Else
                            If Rational_Level = "" Then
                                If Mid(RandomString, tmp0, 1) = "0" Then
                                    Rational_Level = "0"
                                ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                    Rational_Level = "1"
                                End If
                            Else
                                If Lucky_Level = "" Then
                                    If Mid(RandomString, tmp0, 1) = "0" Then
                                        Lucky_Level = "0"
                                    ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                        Lucky_Level = "1"
                                    End If
                                Else
                                    If Lucky_Class = "" Then
                                        If Mid(RandomString, tmp0, 1) = "0" Then
                                            Lucky_Class = "0"
                                        ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                            Lucky_Class = "1"
                                        End If
                                    Else
                                        If TEMType = "" Then
                                            If Mid(RandomString, tmp0, 1) = "?" Then
                                                TEMType = "?"
                                            ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                TEMType = Mid(RandomString, tmp0, 2)
                                            End If
                                        Else
                                            If TEMMaterial = "" Then
                                                If Mid(RandomString, tmp0, 1) = "?" Then
                                                    TEMMaterial = "?"
                                                ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                    TEMMaterial = Mid(RandomString, tmp0, 2)
                                                End If
                                            Else
                                                If TEMCraft = "" Then
                                                    If Mid(RandomString, tmp0, 1) = "?" Then
                                                        TEMCraft = "?"
                                                    ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                        TEMCraft = Mid(RandomString, tmp0, 2)
                                                    End If
                                                Else
                                                    If TEMQuality = "" Then
                                                        If Mid(RandomString, tmp0, 1) = "?" Then
                                                            TEMQuality = "?"
                                                        ElseIf Mid(RandomString, tmp0, 1) <> "," Then
                                                            TEMQuality = Mid(RandomString, tmp0, 1)
                                                        End If
                                                    Else
                                                        If TEMPrefix = "" Then
                                                            If Mid(RandomString, tmp0, 1) = "?" Then
                                                                TEMPrefix = "?"
                                                            ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                                TEMPrefix = Mid(RandomString, tmp0, 2)
                                                            End If
                                                        Else
                                                            If TEMSuffix = "" Then
                                                                If Mid(RandomString, tmp0, 1) = "?" Then
                                                                    TEMSuffix = "?"
                                                                    Exit For
                                                                ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                                    TEMSuffix = Mid(RandomString, tmp0, 2)
                                                                    Exit For
                                                                End If
                                                            End If
                                                        End If
                                                    End If
                                                End If
                                            End If
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            ElseIf Type = "Armor" Then
                If Rational_Archetype = "" Then
                    If Mid(RandomString, tmp0, 1) = "1" Then
                        Rational_Archetype = "1"
                    ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                        Rational_Archetype = "0"
                    End If
                Else
                    If Rational_Sentience = "" Then
                        If Mid(RandomString, tmp0, 1) = "1" Then
                            Rational_Sentience = "1"
                        ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                            Rational_Sentience = "0"
                        End If
                    Else
                        If Rational_Weight = "" Then
                            If Mid(RandomString, tmp0, 1) = "1" Then
                                Rational_Weight = "1"
                            ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                                Rational_Weight = "0"
                            End If
                        Else
                            If Rational_Level = "" Then
                                If Mid(RandomString, tmp0, 1) = "0" Then
                                    Rational_Level = "0"
                                ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                    Rational_Level = "1"
                                End If
                            Else
                                If Lucky_Level = "" Then
                                    If Mid(RandomString, tmp0, 1) = "0" Then
                                        Lucky_Level = "0"
                                    ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                        Lucky_Level = "1"
                                    End If
                                Else
                                    If Lucky_Class = "" Then
                                        If Mid(RandomString, tmp0, 1) = "0" Then
                                            Lucky_Class = "0"
                                        ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                            Lucky_Class = "1"
                                        End If
                                    Else
                                        If TEMType = "" Then
                                            If Mid(RandomString, tmp0, 1) = "?" Then
                                                TEMType = "?"
                                            ElseIf InStr(Mid(RandomString, tmp0, 3), ",") = 0 Then
                                                TEMType = Mid(RandomString, tmp0, 3)
                                            End If
                                        Else
                                            If TEMMaterial = "" Then
                                                If Mid(RandomString, tmp0, 1) = "?" Then
                                                    TEMMaterial = "?"
                                                ElseIf InStr(Mid(RandomString, tmp0, 3), ",") = 0 Then
                                                    TEMMaterial = Mid(RandomString, tmp0, 3)
                                                End If
                                            Else
                                                If TEMCraft = "" Then
                                                    If Mid(RandomString, tmp0, 1) = "?" Then
                                                        TEMCraft = "?"
                                                    ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                        TEMCraft = Mid(RandomString, tmp0, 2)
                                                    End If
                                                Else
                                                    If TEMQuality = "" Then
                                                        If Mid(RandomString, tmp0, 1) = "?" Then
                                                            TEMQuality = "?"
                                                        ElseIf Mid(RandomString, tmp0, 1) <> "," Then
                                                            TEMQuality = Mid(RandomString, tmp0, 1)
                                                        End If
                                                    Else
                                                        If TEMPrefix = "" Then
                                                            If Mid(RandomString, tmp0, 1) = "?" Then
                                                                TEMPrefix = "?"
                                                            ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                                TEMPrefix = Mid(RandomString, tmp0, 2)
                                                            End If
                                                        Else
                                                            If TEMSuffix = "" Then
                                                                If Mid(RandomString, tmp0, 1) = "?" Then
                                                                    TEMSuffix = "?"
                                                                    Exit For
                                                                ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                                                    TEMSuffix = Mid(RandomString, tmp0, 2)
                                                                    Exit For
                                                                End If
                                                            End If
                                                        End If
                                                    End If
                                                End If
                                            End If
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            ElseIf Type = "Misc" Then
                If Rational_Archetype = "" Then
                    If Mid(RandomString, tmp0, 1) = "1" Then
                        Rational_Archetype = "1"
                    ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                        Rational_Archetype = "0"
                    End If
                Else
                    If Rational_Sentience = "" Then
                        If Mid(RandomString, tmp0, 1) = "1" Then
                            Rational_Sentience = "1"
                        ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                            Rational_Sentience = "0"
                        End If
                    Else
                        If Rational_Weight = "" Then
                            If Mid(RandomString, tmp0, 1) = "1" Then
                                Rational_Weight = "1"
                            ElseIf Mid(RandomString, tmp0, 1) = "0" Then
                                Rational_Weight = "0"
                            End If
                        Else
                            If Rational_Level = "" Then
                                If Mid(RandomString, tmp0, 1) = "0" Then
                                    Rational_Level = "0"
                                ElseIf Mid(RandomString, tmp0, 1) = "1" Then
                                    Rational_Level = "1"
                                End If
                            Else
                                If TEMType = "" Then
                                    If Mid(RandomString, tmp0, 1) = "?" Then
                                        TEMType = "?"
                                        TEMType2 = "?"
                                        Exit For
                                    ElseIf InStr(Mid(RandomString, tmp0, 2), ",") = 0 Then
                                        TEMType = Mid(RandomString, tmp0, 2)
                                    End If
                                Else
                                    If TEMType2 = "" Then
                                        If Mid(RandomString, tmp0, 1) = "?" Then
                                            TEMType2 = "?"
                                        ElseIf InStr(Mid(RandomString, tmp0, 3), ",") = 0 Then
                                            TEMType2 = Mid(RandomString, tmp0, 3)
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            End If
        Next
        Dim Material As String = "", MaterialNum As Short, AddAffects As String = "", AffectNum As Short
        Dim QualityNum As Short, Quality As String = "", QualityFlag As String = ""
        Dim CraftsmanshipNum As Short = sr.Next(1, 13), Craftsmanship As String = ""
        If LastGeneratedCraftsmanship = CraftsmanshipNum Then
            CraftsmanshipNum = sr.Next(1, 13)
        Else
            LastGeneratedCraftsmanship = CraftsmanshipNum
        End If
        If Type = "Weapon" Or Type = "Armor" Then
            QualityNum = sr.Next(1, 101)
            If CraftsmanshipNum < 9 Then
                Quality = "Standard"
                QualityFlag = "/W"
            ElseIf CraftsmanshipNum < 12 Then
                If QualityNum < 51 Then
                    Quality = "Standard"
                    QualityFlag = "/W"
                ElseIf QualityNum < 100 Then
                    Quality = "Magical"
                    QualityFlag = "/B"
                ElseIf QualityNum = 100 Then
                    Quality = "Rare"
                    QualityFlag = "/M"
                End If
            ElseIf CraftsmanshipNum = 12 Then
                If QualityNum < 51 Then
                    Quality = "Standard"
                    QualityFlag = "/W"
                ElseIf QualityNum < 96 Then
                    Quality = "Magical"
                    QualityFlag = "/B"
                ElseIf QualityNum < 100 Then
                    Quality = "Rare"
                    QualityFlag = "/M"
                Else
                    Quality = "Unique"
                    QualityFlag = "/Y"
                End If
            End If
            QualityNum = sr.Next(1, 101)
            If QualityNum = 100 Then
                Quality = "Legendary"
                QualityFlag = "/G"
            End If

            If CraftsmanshipNum = 1 Then
                Craftsmanship = "Trashy"
            ElseIf CraftsmanshipNum = 2 Then
                Craftsmanship = "Crude"
            ElseIf CraftsmanshipNum = 3 Then
                Craftsmanship = "Shoddy"
            ElseIf CraftsmanshipNum = 4 Then
                Craftsmanship = "Poor"
            ElseIf CraftsmanshipNum = 5 Then
                Craftsmanship = "Inferior"
            ElseIf CraftsmanshipNum = 6 Then
                Craftsmanship = "Adequate"
            ElseIf CraftsmanshipNum = 7 Then
                Craftsmanship = "Acceptable"
            ElseIf CraftsmanshipNum = 8 Then
                Craftsmanship = "Average"
            ElseIf CraftsmanshipNum = 9 Then
                Craftsmanship = "Fine"
            ElseIf CraftsmanshipNum = 10 Then
                Craftsmanship = "Exceptional"
            ElseIf CraftsmanshipNum = 11 Then
                Craftsmanship = "Flawless"
            ElseIf CraftsmanshipNum = 12 Then
                Craftsmanship = "Masterwork"
            End If
            Dim MaterialFound As Boolean = False
            While MaterialFound = False
                MaterialNum = sr.Next(0, 141)
                If Type = "Weapon" Then
                    If MaterialNum <= 91 Then
                        MaterialFound = True
                    End If
                Else
                    MaterialFound = True
                End If
            End While
            If MaterialNum = 0 Then
                Material = "Magnesium"
            ElseIf MaterialNum = 1 Then
                Material = "Aluminium"
            ElseIf MaterialNum = 2 Then
                Material = "Duralumin"
            ElseIf MaterialNum = 3 Then
                Material = "Silumin"
            ElseIf MaterialNum = 4 Then
                Material = "Magnalium"
            ElseIf MaterialNum = 5 Then
                Material = "Alnico"
            ElseIf MaterialNum = 6 Then
                Material = "Potassium"
            ElseIf MaterialNum = 7 Then
                Material = "Iron"
            ElseIf MaterialNum = 8 Then
                Material = "Steel"
            ElseIf MaterialNum = 9 Then
                Material = "Chromoly"
            ElseIf MaterialNum = 10 Then
                Material = "Invar"
            ElseIf MaterialNum = 11 Then
                Material = "Cobalt"
            ElseIf MaterialNum = 12 Then
                Material = "Stellite"
            ElseIf MaterialNum = 13 Then
                Material = "Vitallium"
            ElseIf MaterialNum = 14 Then
                Material = "Nickel"
            ElseIf MaterialNum = 15 Then
                Material = "Chromel"
            ElseIf MaterialNum = 16 Then
                Material = "Nichrome"
            ElseIf MaterialNum = 17 Then
                Material = "Cupronickel"
            ElseIf MaterialNum = 18 Then
                Material = "Copper"
            ElseIf MaterialNum = 19 Then
                Material = "Billon"
            ElseIf MaterialNum = 20 Then
                Material = "Brass"
            ElseIf MaterialNum = 21 Then
                Material = "Tombac"
            ElseIf MaterialNum = 22 Then
                Material = "Bronze"
            ElseIf MaterialNum = 23 Then
                Material = "Hepatizon"
            ElseIf MaterialNum = 24 Then
                Material = "Shakudo"
            ElseIf MaterialNum = 25 Then
                Material = "Tumbaga"
            ElseIf MaterialNum = 26 Then
                Material = "Zinc"
            ElseIf MaterialNum = 27 Then
                Material = "Gallium"
            ElseIf MaterialNum = 28 Then
                Material = "Zirconium"
            ElseIf MaterialNum = 29 Then
                Material = "Silver"
            ElseIf MaterialNum = 30 Then
                Material = "Indium"
            ElseIf MaterialNum = 31 Then
                Material = "Tin"
            ElseIf MaterialNum = 32 Then
                Material = "Gold"
            ElseIf MaterialNum = 33 Then
                Material = "Mercury"
            ElseIf MaterialNum = 34 Then
                Material = "Lead"
            ElseIf MaterialNum = 35 Then
                Material = "Bismuth"
            ElseIf MaterialNum = 36 Then
                Material = "Uranium"
            ElseIf MaterialNum = 37 Then
                Material = "Agate"
            ElseIf MaterialNum = 38 Then
                Material = "Chrysoberyl"
            ElseIf MaterialNum = 39 Then
                Material = "Alexandrite"
            ElseIf MaterialNum = 40 Then
                Material = "Cymophane"
            ElseIf MaterialNum = 41 Then
                Material = "Emerald"
            ElseIf MaterialNum = 42 Then
                Material = "Bixbite"
            ElseIf MaterialNum = 43 Then
                Material = "Aquamarine"
            ElseIf MaterialNum = 44 Then
                Material = "Morgenite"
            ElseIf MaterialNum = 45 Then
                Material = "Goshenite"
            ElseIf MaterialNum = 46 Then
                Material = "Golden Beryl"
            ElseIf MaterialNum = 47 Then
                Material = "Heliodor"
            ElseIf MaterialNum = 48 Then
                Material = "Maxixe"
            ElseIf MaterialNum = 49 Then
                Material = "Chrysocolla"
            ElseIf MaterialNum = 50 Then
                Material = "Chrysoprase"
            ElseIf MaterialNum = 51 Then
                Material = "Diamond"
            ElseIf MaterialNum = 52 Then
                Material = "Feldspar"
            ElseIf MaterialNum = 53 Then
                Material = "Garnet"
            ElseIf MaterialNum = 54 Then
                Material = "Hematite"
            ElseIf MaterialNum = 55 Then
                Material = "Jade"
            ElseIf MaterialNum = 56 Then
                Material = "Jasper"
            ElseIf MaterialNum = 57 Then
                Material = "Kunzite"
            ElseIf MaterialNum = 58 Then
                Material = "Lapis"
            ElseIf MaterialNum = 59 Then
                Material = "Malachite"
            ElseIf MaterialNum = 60 Then
                Material = "Obsidian"
            ElseIf MaterialNum = 61 Then
                Material = "Olivine"
            ElseIf MaterialNum = 62 Then
                Material = "Pyrite"
            ElseIf MaterialNum = 63 Then
                Material = "Citrine"
            ElseIf MaterialNum = 64 Then
                Material = "Ruby"
            ElseIf MaterialNum = 65 Then
                Material = "Sapphire"
            ElseIf MaterialNum = 66 Then
                Material = "Sugilite"
            ElseIf MaterialNum = 67 Then
                Material = "Tanzanite"
            ElseIf MaterialNum = 68 Then
                Material = "Topaz"
            ElseIf MaterialNum = 69 Then
                Material = "Turqoise"
            ElseIf MaterialNum = 70 Then
                Material = "Tourmaline"
            ElseIf MaterialNum = 71 Then
                Material = "Zircon"
            ElseIf MaterialNum = 72 Then
                Material = "Andalusite"
            ElseIf MaterialNum = 73 Then
                Material = "Benitoite"
            ElseIf MaterialNum = 74 Then
                Material = "Onyx"
            ElseIf MaterialNum = 75 Then
                Material = "Ammolite"
            ElseIf MaterialNum = 76 Then
                Material = "Coral"
            ElseIf MaterialNum = 77 Then
                Material = "Ivory"
            ElseIf MaterialNum = 78 Then
                Material = "Pearl"
            ElseIf MaterialNum = 79 Then
                Material = "Bone"
            ElseIf MaterialNum = 80 Then
                Material = "Lignite"
            ElseIf MaterialNum = 81 Then
                Material = "Platinum"
            ElseIf MaterialNum = 82 Then
                Material = "Palladium"
            ElseIf MaterialNum = 83 Then
                Material = "Glass"
            ElseIf MaterialNum = 84 Then
                Material = "Chestnut"
            ElseIf MaterialNum = 85 Then
                Material = "Basswood"
            ElseIf MaterialNum = 86 Then
                Material = "Dogwood"
            ElseIf MaterialNum = 87 Then
                Material = "Mahogany"
            ElseIf MaterialNum = 88 Then
                Material = "Maple"
            ElseIf MaterialNum = 89 Then
                Material = "Red Oak"
            ElseIf MaterialNum = 90 Then
                Material = "Rosewood"
            ElseIf MaterialNum = 91 Then
                Material = "Bamboo"
            ElseIf MaterialNum = 92 Then
                Material = "Wool"
            ElseIf MaterialNum = 93 Then
                Material = "Cotton"
            ElseIf MaterialNum = 94 Then
                Material = "Silk"
            ElseIf MaterialNum = 95 Then
                Material = "Spidersilk"
            ElseIf MaterialNum = 96 Then
                Material = "Linen"
            ElseIf MaterialNum = 97 Then
                Material = "Ramie"
            ElseIf MaterialNum = 98 Then
                Material = "Hemp"
            ElseIf MaterialNum = 99 Then
                Material = "Nettle"
            ElseIf MaterialNum = 100 Then
                Material = "Raffia"
            ElseIf MaterialNum = 101 Then
                Material = "Jute"
            ElseIf MaterialNum = 102 Then
                Material = "Barkcloth"
            ElseIf MaterialNum = 103 Then
                Material = "Batiste"
            ElseIf MaterialNum = 104 Then
                Material = "Bombazine"
            ElseIf MaterialNum = 105 Then
                Material = "Burlap"
            ElseIf MaterialNum = 106 Then
                Material = "Buckram"
            ElseIf MaterialNum = 107 Then
                Material = "Canvas"
            ElseIf MaterialNum = 108 Then
                Material = "Chino"
            ElseIf MaterialNum = 109 Then
                Material = "Crape"
            ElseIf MaterialNum = 110 Then
                Material = "Harris Tweed"
            ElseIf MaterialNum = 111 Then
                Material = "Hodden"
            ElseIf MaterialNum = 112 Then
                Material = "Serge"
            ElseIf MaterialNum = 113 Then
                Material = "Moleskin"
            ElseIf MaterialNum = 114 Then
                Material = "Flannel"
            ElseIf MaterialNum = 115 Then
                Material = "Camlet"
            ElseIf MaterialNum = 116 Then
                Material = "Brocade"
            ElseIf MaterialNum = 117 Then
                Material = "Damask"
            ElseIf MaterialNum = 118 Then
                Material = "Polar Fleece"
            ElseIf MaterialNum = 119 Then
                Material = "Velvet"
            ElseIf MaterialNum = 120 Then
                Material = "Zibeline"
            ElseIf MaterialNum = 121 Then
                Material = "Felt"
            ElseIf MaterialNum = 122 Then
                Material = "Tulle"
            ElseIf MaterialNum = 123 Then
                Material = "Fur"
            ElseIf MaterialNum = 124 Then
                Material = "Light Leather"
            ElseIf MaterialNum = 125 Then
                Material = "Medium Leather"
            ElseIf MaterialNum = 126 Then
                Material = "Heavy Leather"
            ElseIf MaterialNum = 127 Then
                Material = "Aniline Leather"
            ElseIf MaterialNum = 128 Then
                Material = "Boiled Leather"
            ElseIf MaterialNum = 129 Then
                Material = "Shell Cordovan"
            ElseIf MaterialNum = 130 Then
                Material = "Nappa Leather"
            ElseIf MaterialNum = 131 Then
                Material = "Nubuck"
            ElseIf MaterialNum = 132 Then
                Material = "Shagreen"
            ElseIf MaterialNum = 133 Then
                Material = "Suede"
            ElseIf MaterialNum = 134 Then
                Material = "Sequin"
            ElseIf MaterialNum = 135 Then
                Material = "Millefiori"
            ElseIf MaterialNum = 136 Then
                Material = "Chevron Bead"
            ElseIf MaterialNum = 137 Then
                Material = "Cinnabar Bead"
            ElseIf MaterialNum = 138 Then
                Material = "Dragon Scale"
            ElseIf MaterialNum = 139 Then
                Material = "Wyrm Scale"
            ElseIf MaterialNum = 140 Then
                Material = "Chitin"
            ElseIf MaterialNum = 141 Then
                Material = "Flesh"
            End If
            AddAffects = ""
            Dim FinishedAffects As Boolean = False
            Dim NumOfAffects As Short = 0
            While FinishedAffects = False
                If Quality = "Standard" Then
                    FinishedAffects = True
                ElseIf Quality = "Magical" Then
                    If NumOfAffects = 1 Then
                        FinishedAffects = True
                    End If
                ElseIf Quality = "Rare" Then
                    If NumOfAffects = 2 Then
                        FinishedAffects = True
                    End If
                ElseIf Quality = "Unique" Then
                    If NumOfAffects = 3 Then
                        FinishedAffects = True
                    End If
                ElseIf Quality = "Legendary" Then
                    If NumOfAffects = 4 Then
                        FinishedAffects = True
                    End If
                End If
                If FinishedAffects = False Then
                    If Type = "Weapon" Then
                        AffectNum = sr.Next(0, 1)
                        If AffectNum = 0 Then 'prefix
                            AffectNum = sr.Next(1, 44)
                            If daprefix <> "" Then daprefix += " "
                            If AffectNum = 1 Then
                                daprefix = "Dwarven"
                            ElseIf AffectNum = 2 Then
                                daprefix = "Elven"
                            ElseIf AffectNum = 3 Then
                                daprefix = "Simple"
                            ElseIf AffectNum = 4 Then
                                daprefix = "Shadowed"
                            ElseIf AffectNum = 5 Then
                                daprefix = "Outlandish"
                            ElseIf AffectNum = 6 Then
                                daprefix = "Celestial"
                            ElseIf AffectNum = 7 Then
                                daprefix = "Ancestral"
                            ElseIf AffectNum = 8 Then
                                daprefix = "Fortified"
                            ElseIf AffectNum = 9 Then
                                daprefix = "Stargazer"
                            ElseIf AffectNum = 10 Then
                                daprefix = "Glowing"
                            ElseIf AffectNum = 11 Then
                                daprefix = "Adept"
                            ElseIf AffectNum = 12 Then
                                daprefix = "Scouts"
                            ElseIf AffectNum = 13 Then
                                daprefix = "Avarieen"
                            ElseIf AffectNum = 14 Then
                                daprefix = "Dark"
                            ElseIf AffectNum = 15 Then
                                daprefix = "Illuminating"
                            ElseIf AffectNum = 16 Then
                                daprefix = "Radiant"
                            ElseIf AffectNum = 17 Then
                                daprefix = "Woodland"
                            ElseIf AffectNum = 18 Then
                                daprefix = "Grassland"
                            ElseIf AffectNum = 19 Then
                                daprefix = "Mountain"
                            ElseIf AffectNum = 20 Then
                                daprefix = "Desert"
                            ElseIf AffectNum = 21 Then
                                daprefix = "Swampland"
                            ElseIf AffectNum = 22 Then
                                daprefix = "Ethereal"
                            ElseIf AffectNum = 23 Then
                                daprefix = "Parasitic"
                            ElseIf AffectNum = 24 Then
                                daprefix = "Predatorial"
                            ElseIf AffectNum = 25 Then
                                daprefix = "Vampiric"
                            ElseIf AffectNum = 26 Then
                                daprefix = "Moonlit"
                            ElseIf AffectNum = 27 Then
                                daprefix = "Arcane"
                            ElseIf AffectNum = 28 Then
                                daprefix = "Ritualistic"
                            ElseIf AffectNum = 29 Then
                                daprefix = "Heated"
                            ElseIf AffectNum = 30 Then
                                daprefix = "Flaming"
                            ElseIf AffectNum = 31 Then
                                daprefix = "Flamestorm"
                            ElseIf AffectNum = 32 Then
                                daprefix = "Cold"
                            ElseIf AffectNum = 33 Then
                                daprefix = "Frozen"
                            ElseIf AffectNum = 34 Then
                                daprefix = "Blizzard"
                            ElseIf AffectNum = 35 Then
                                daprefix = "Jolting"
                            ElseIf AffectNum = 36 Then
                                daprefix = "Shocking"
                            ElseIf AffectNum = 37 Then
                                daprefix = "Thundering"
                            ElseIf AffectNum = 38 Then
                                daprefix = "Shaking"
                            ElseIf AffectNum = 39 Then
                                daprefix = "Pulsing"
                            ElseIf AffectNum = 40 Then
                                daprefix = "Uprooting"
                            ElseIf AffectNum = 41 Then
                                daprefix = "Grim"
                            ElseIf AffectNum = 42 Then
                                daprefix = "Corrupt"
                            ElseIf AffectNum = 43 Then
                                daprefix = "Vile"
                            End If
                        Else 'suffix
                            AffectNum = sr.Next(1, 64)
                            If dasuffix <> "" Then dasuffix += " "
                            If AffectNum = 1 Then
                                dasuffix = "of vitality"
                            ElseIf AffectNum = 2 Then
                                dasuffix = "of willpower"
                            ElseIf AffectNum = 3 Then
                                dasuffix = "of stamina"
                            ElseIf AffectNum = 4 Then
                                dasuffix = "of the tiger"
                            ElseIf AffectNum = 5 Then
                                dasuffix = "of the bear"
                            ElseIf AffectNum = 6 Then
                                dasuffix = "of the lion"
                            ElseIf AffectNum = 7 Then
                                dasuffix = "of the lynx"
                            ElseIf AffectNum = 8 Then
                                dasuffix = "of the eagle"
                            ElseIf AffectNum = 9 Then
                                dasuffix = "of the bat"
                            ElseIf AffectNum = 10 Then
                                dasuffix = "of the wolf"
                            ElseIf AffectNum = 11 Then
                                dasuffix = "of the panther"
                            ElseIf AffectNum = 12 Then
                                dasuffix = "of the badger"
                            ElseIf AffectNum = 13 Then
                                dasuffix = "of the cheetah"
                            ElseIf AffectNum = 14 Then
                                dasuffix = "of the spider"
                            ElseIf AffectNum = 15 Then
                                dasuffix = "of the owl"
                            ElseIf AffectNum = 16 Then
                                dasuffix = "of the moon"
                            ElseIf AffectNum = 17 Then
                                dasuffix = "of the leopard"
                            ElseIf AffectNum = 18 Then
                                dasuffix = "of the daring"
                            ElseIf AffectNum = 19 Then
                                dasuffix = "of the sun"
                            ElseIf AffectNum = 20 Then
                                dasuffix = "of the falcon"
                            ElseIf AffectNum = 21 Then
                                dasuffix = "of the sage"
                            ElseIf AffectNum = 22 Then
                                dasuffix = "of the politician"
                            ElseIf AffectNum = 23 Then
                                dasuffix = "of the careful"
                            ElseIf AffectNum = 24 Then
                                dasuffix = "of strength"
                            ElseIf AffectNum = 25 Then
                                dasuffix = "of dexterity"
                            ElseIf AffectNum = 26 Then
                                dasuffix = "of intelligence"
                            ElseIf AffectNum = 27 Then
                                dasuffix = "of wisdom"
                            ElseIf AffectNum = 28 Then
                                dasuffix = "of constitution"
                            ElseIf AffectNum = 29 Then
                                dasuffix = "of charisma"
                            ElseIf AffectNum = 30 Then
                                dasuffix = "of luck"
                            ElseIf AffectNum = 31 Then
                                dasuffix = "of the soulstrung"
                            ElseIf AffectNum = 32 Then
                                dasuffix = "of thought"
                            ElseIf AffectNum = 33 Then
                                dasuffix = "of the swift"
                            ElseIf AffectNum = 34 Then
                                dasuffix = "of the faithful"
                            ElseIf AffectNum = 35 Then
                                dasuffix = "of anger"
                            ElseIf AffectNum = 36 Then
                                dasuffix = "of solitude"
                            ElseIf AffectNum = 37 Then
                                dasuffix = "of misguiding"
                            ElseIf AffectNum = 38 Then
                                dasuffix = "of purgery"
                            ElseIf AffectNum = 39 Then
                                dasuffix = "of judgement"
                            ElseIf AffectNum = 40 Then
                                dasuffix = "of shadows"
                            ElseIf AffectNum = 41 Then
                                dasuffix = "of thoughtlessness"
                            ElseIf AffectNum = 42 Then
                                dasuffix = "of annihilation"
                            ElseIf AffectNum = 43 Then
                                dasuffix = "of desolation"
                            ElseIf AffectNum = 44 Then
                                dasuffix = "of misery"
                            ElseIf AffectNum = 45 Then
                                dasuffix = "of the tempest"
                            ElseIf AffectNum = 46 Then
                                dasuffix = "of The Bleak"
                            ElseIf AffectNum = 47 Then
                                dasuffix = "of New Saellem"
                            ElseIf AffectNum = 48 Then
                                dasuffix = "of Crecia"
                            ElseIf AffectNum = 49 Then
                                dasuffix = "of Tharsis"
                            ElseIf AffectNum = 50 Then
                                dasuffix = "of Narsis"
                            ElseIf AffectNum = 51 Then
                                dasuffix = "of Jewall"
                            ElseIf AffectNum = 52 Then
                                dasuffix = "of grief"
                            ElseIf AffectNum = 53 Then
                                dasuffix = "of affliction"
                            ElseIf AffectNum = 54 Then
                                dasuffix = "of ghost touch"
                            ElseIf AffectNum = 55 Then
                                dasuffix = "of shadowstriking"
                            ElseIf AffectNum = 56 Then
                                dasuffix = "of dread"
                            ElseIf AffectNum = 57 Then
                                dasuffix = "of decay"
                            ElseIf AffectNum = 58 Then
                                dasuffix = "of infection"
                            ElseIf AffectNum = 59 Then
                                dasuffix = "of the ghost"
                            ElseIf AffectNum = 60 Then
                                dasuffix = "of the specter"
                            ElseIf AffectNum = 61 Then
                                dasuffix = "of the phantom"
                            ElseIf AffectNum = 62 Then
                                dasuffix = "of the wraith"
                            ElseIf AffectNum = 63 Then
                                dasuffix = "of the archon"
                            ElseIf AffectNum = 64 Then 'ranged only, implement
                                dasuffix = "of focus"
                            ElseIf AffectNum = 65 Then 'ranged only, implement
                                dasuffix = "of reach"
                            ElseIf AffectNum = 66 Then 'ranged only, implement
                                dasuffix = "of precision"
                            ElseIf AffectNum = 67 Then 'ranged only, implement
                                dasuffix = "of projection"
                            ElseIf AffectNum = 68 Then 'ranged only, imnplement
                                dasuffix = "of mastery"
                            End If
                        End If
                    ElseIf Type = "Armor" Then
                        AffectNum = sr.Next(0, 1)
                        If AffectNum = 0 Then 'prefix
                            AffectNum = sr.Next(1, 32)
                            If daprefix <> "" Then daprefix += " "
                            If AffectNum = 1 Then
                                daprefix = "Dwarven"
                            ElseIf AffectNum = 2 Then
                                daprefix = "Elven"
                            ElseIf AffectNum = 3 Then
                                daprefix = "Simple"
                            ElseIf AffectNum = 4 Then
                                daprefix = "Shadowed"
                            ElseIf AffectNum = 5 Then
                                daprefix = "Outlandish"
                            ElseIf AffectNum = 6 Then
                                daprefix = "Celestial"
                            ElseIf AffectNum = 7 Then
                                daprefix = "Ancestral"
                            ElseIf AffectNum = 8 Then
                                daprefix = "Fortified"
                            ElseIf AffectNum = 9 Then
                                daprefix = "Stargazer"
                            ElseIf AffectNum = 10 Then
                                daprefix = "Glowing"
                            ElseIf AffectNum = 11 Then
                                daprefix = "Adept"
                            ElseIf AffectNum = 12 Then
                                daprefix = "Scouts"
                            ElseIf AffectNum = 13 Then
                                daprefix = "Avarieen"
                            ElseIf AffectNum = 14 Then
                                daprefix = "Dark"
                            ElseIf AffectNum = 15 Then
                                daprefix = "Illuminating"
                            ElseIf AffectNum = 16 Then
                                daprefix = "Radiant"
                            ElseIf AffectNum = 17 Then
                                daprefix = "Woodland"
                            ElseIf AffectNum = 18 Then
                                daprefix = "Grassland"
                            ElseIf AffectNum = 19 Then
                                daprefix = "Mountain"
                            ElseIf AffectNum = 20 Then
                                daprefix = "Desert"
                            ElseIf AffectNum = 21 Then
                                daprefix = "Swampland"
                            ElseIf AffectNum = 22 Then
                                daprefix = "Ethereal"
                            ElseIf AffectNum = 23 Then
                                daprefix = "Swift"
                            ElseIf AffectNum = 24 Then
                                daprefix = "Steadfast"
                            ElseIf AffectNum = 25 Then
                                daprefix = "Padded"
                            ElseIf AffectNum = 26 Then
                                daprefix = "Nightwalkers"
                            ElseIf AffectNum = 27 Then
                                daprefix = "Tribal"
                            ElseIf AffectNum = 28 Then
                                daprefix = "Brawny"
                            ElseIf AffectNum = 29 Then
                                daprefix = "Enforced"
                            ElseIf AffectNum = 30 Then
                                daprefix = "Resilient"
                            ElseIf AffectNum = 31 Then
                                daprefix = "Pristine"
                            End If
                        Else 'suffix
                            AffectNum = sr.Next(1, 50)
                            If dasuffix <> "" Then dasuffix += " "
                            If AffectNum = 1 Then
                                dasuffix = "of vitality"
                            ElseIf AffectNum = 2 Then
                                dasuffix = "of willpower"
                            ElseIf AffectNum = 3 Then
                                dasuffix = "of stamina"
                            ElseIf AffectNum = 4 Then
                                dasuffix = "of the tiger"
                            ElseIf AffectNum = 5 Then
                                dasuffix = "of the bear"
                            ElseIf AffectNum = 6 Then
                                dasuffix = "of the lion"
                            ElseIf AffectNum = 7 Then
                                dasuffix = "of the lynx"
                            ElseIf AffectNum = 8 Then
                                dasuffix = "of the eagle"
                            ElseIf AffectNum = 9 Then
                                dasuffix = "of the bat"
                            ElseIf AffectNum = 10 Then
                                dasuffix = "of the wolf"
                            ElseIf AffectNum = 11 Then
                                dasuffix = "of the panther"
                            ElseIf AffectNum = 12 Then
                                dasuffix = "of the badger"
                            ElseIf AffectNum = 13 Then
                                dasuffix = "of the cheetah"
                            ElseIf AffectNum = 14 Then
                                dasuffix = "of the spider"
                            ElseIf AffectNum = 15 Then
                                dasuffix = "of the owl"
                            ElseIf AffectNum = 16 Then
                                dasuffix = "of the moon"
                            ElseIf AffectNum = 17 Then
                                dasuffix = "of the leopard"
                            ElseIf AffectNum = 18 Then
                                dasuffix = "of the daring"
                            ElseIf AffectNum = 19 Then
                                dasuffix = "of the sun"
                            ElseIf AffectNum = 20 Then
                                dasuffix = "of the falcon"
                            ElseIf AffectNum = 21 Then
                                dasuffix = "of the sage"
                            ElseIf AffectNum = 22 Then
                                dasuffix = "of the politician"
                            ElseIf AffectNum = 23 Then
                                dasuffix = "of the careful"
                            ElseIf AffectNum = 24 Then
                                dasuffix = "of strength"
                            ElseIf AffectNum = 25 Then
                                dasuffix = "of dexterity"
                            ElseIf AffectNum = 26 Then
                                dasuffix = "of intelligence"
                            ElseIf AffectNum = 27 Then
                                dasuffix = "of wisdom"
                            ElseIf AffectNum = 28 Then
                                dasuffix = "of constitution"
                            ElseIf AffectNum = 29 Then
                                dasuffix = "of charisma"
                            ElseIf AffectNum = 30 Then
                                dasuffix = "of luck"
                            ElseIf AffectNum = 31 Then
                                dasuffix = "of the soulstrung"
                            ElseIf AffectNum = 32 Then
                                dasuffix = "of thought"
                            ElseIf AffectNum = 33 Then
                                dasuffix = "of the swift"
                            ElseIf AffectNum = 34 Then
                                dasuffix = "of the faithful"
                            ElseIf AffectNum = 35 Then
                                dasuffix = "of anger"
                            ElseIf AffectNum = 36 Then
                                dasuffix = "of solitude"
                            ElseIf AffectNum = 37 Then
                                dasuffix = "of misguiding"
                            ElseIf AffectNum = 38 Then
                                dasuffix = "of purgery"
                            ElseIf AffectNum = 39 Then
                                dasuffix = "of judgement"
                            ElseIf AffectNum = 40 Then
                                dasuffix = "of shadows"
                            ElseIf AffectNum = 41 Then
                                dasuffix = "of thoughtlessness"
                            ElseIf AffectNum = 42 Then
                                dasuffix = "of darkness"
                            ElseIf AffectNum = 43 Then
                                dasuffix = "of secrecy"
                            ElseIf AffectNum = 44 Then
                                dasuffix = "of protection"
                            ElseIf AffectNum = 45 Then
                                dasuffix = "of reversal" 'shield only, implement
                            ElseIf AffectNum = 46 Then
                                dasuffix = "of repulsion" 'shield only, implement
                            ElseIf AffectNum = 47 Then
                                dasuffix = "of vengeance" 'shield only, implement
                            ElseIf AffectNum = 48 Then
                                dasuffix = "of retribution" 'shield only, implement
                            ElseIf AffectNum = 49 Then
                                dasuffix = "of protection" 'shield only, implement
                            End If
                        End If
                    End If
                    NumOfAffects += 1
                End If
            End While
        End If
        If Type = "Weapon" Then
            Dim WeaponNum As Short, WType As String = "", DamageType As String = "", ExtendedDesc As String = "", PurchaseArea As String = ""
            Dim ClassSpecific As String = "", AOE As String = "", Damage As String = "", TwoHanded As String = "", LvlReq As String = "", Worth As String = ""
            Dim RandomNum As Integer
            iITEMT = "5"
            iITEMC = "00"
            RandomNum = sr.Next(0, 67)
            If RandomNum = lastgeneratedweapon Then
                RandomNum = sr.Next(0, 67)
            Else
                lastgeneratedweapon = RandomNum
            End If
            If RandomNum = 0 Then : WType = "Seax"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("40 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 1 Then : WType = "Stiletto"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 15 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("15")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 2 Then : WType = "Pugio"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 26 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("26")
                End If
                Worth = comworth("30 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Dupree"
            ElseIf RandomNum = 3 Then : WType = "Poniard"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 6 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("6")
                End If
                Worth = comworth("15 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "The Undercontinent"
            ElseIf RandomNum = 4 Then : WType = "Dirk"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 67 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("67")
                End If
                Worth = comworth("50 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Jewall"
            ElseIf RandomNum = 5 Then : WType = "Dagger"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("30 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 6 Then : WType = "Pickaxe"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 12 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("12")
                End If
                Worth = comworth("12 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Jewall, Doonan"
            ElseIf RandomNum = 7 Then : WType = "Katar"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Hand Weapon")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("1 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Tharsis, Narsis"
            ElseIf RandomNum = 8 Then : WType = "Cestus"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Hand Weapon")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 50 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("50")
                End If
                Worth = comworth("57 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Narsis, Moran"
            ElseIf RandomNum = 9 Then : WType = "Shortbow"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Bow")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("30 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 10 Then : WType = "Longbow"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Bow")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 10 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("10")
                End If
                Worth = comworth("60 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 11 Then : WType = "Composite Bow"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Bow")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 25 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("25")
                End If
                Worth = comworth("3 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 12 Then : WType = "Shuriken"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Throwing Stars")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Range")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("9 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem, Dillan"
            ElseIf RandomNum = 13 Then : WType = "Darts"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Throwing Darts")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 40 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("40")
                End If
                Worth = comworth("35 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Moran, Winebridge"
            ElseIf RandomNum = 14 Then : WType = "Tomahawk Axe"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Throwing Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 12 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("12")
                End If
                Worth = comworth("40 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Northern Reach"
            ElseIf RandomNum = 15 Then : WType = "Kunai"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Throwing Knives")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Range")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 25 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("25")
                End If
                Worth = comworth("10 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 16 Then : WType = "Javelin"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Throwing Spears")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Range")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("60 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Darkwood"
            ElseIf RandomNum = 17 Then : WType = "Spear"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("80 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 18 Then : WType = "Pike"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 20 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("20")
                End If
                Worth = comworth("3 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 19 Then : WType = "Doloire"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 60 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("60")
                End If
                Worth = comworth("2 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 20 Then : WType = "Ranseur"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 45 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("45")
                End If
                Worth = comworth("1 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 21 Then : WType = "Spetum"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 22 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("22")
                End If
                Worth = comworth("80 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 22 Then : WType = "Hasta"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm with Both ends")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("60 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 23 Then : WType = "Tepoztopilli"
                GatherMaterialInfo(Material)
                DamageType = "Pierce"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 65 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("65")
                End If
                Worth = comworth("6 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 24 Then : WType = "Falcata"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Sabre")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 30 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("30")
                End If
                Worth = comworth("3 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Doonan, Dillan"
            ElseIf RandomNum = 25 Then : WType = "Gladius"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Straight Shortsword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 15 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("15")
                End If
                Worth = comworth("90 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Dupree, Moran"
            ElseIf RandomNum = 26 Then : WType = "Kopis"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Mini Hoop-curved Sickle")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 75 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("75")
                End If
                Worth = comworth("18 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 27 Then : WType = "Shortsword"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("60 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 28 Then : WType = "Broadsword"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Wide Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 5 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("5")
                End If
                Worth = comworth("3 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 29 Then : WType = "Masakari"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Large Pick-Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 25 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("25")
                End If
                Worth = comworth("70 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 30 Then : WType = "Sappara"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Thin C-Curved Center Sabre")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 50 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("50")
                End If
                Worth = comworth("5 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 31 Then : WType = "Khopesh"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Mini C-Curved Sickle")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 75 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("75")
                End If
                Worth = comworth("35 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 32 Then : WType = "Longsword"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("8 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 33 Then : WType = "Flamberge"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Flame-tongued Claymore")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("40 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Tharsis, Narsis"
            ElseIf RandomNum = 34 Then : WType = "Falchion"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Wide Sabre")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 26 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("26")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Doonan, Dillan"
            ElseIf RandomNum = 35 Then : WType = "Claymore"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Extra Long Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 30 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("30")
                End If
                Worth = comworth("25 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Tharsis, Narsis"
            ElseIf RandomNum = 36 Then : WType = "Hatchet"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Small Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("15 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Darkwood, Tharsis"
            ElseIf RandomNum = 37 Then : WType = "Axe"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("40 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 38 Then : WType = "Field Axe"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Long-Handled Axe")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 5 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("5")
                End If
                Worth = comworth("2 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 39 Then : WType = "Rapier"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Sabre")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 45 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("45")
                End If
                Worth = comworth("40 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 40 Then : WType = "Scythe"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Long-Handled Sickle")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 26 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("26")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 41 Then : WType = "Chakrum"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Boomerang")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Range")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 18 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("18")
                End If
                Worth = comworth("27 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 42 Then : WType = "Scimitar"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Sabre")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 20 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("20")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Doonan, Dillan"
            ElseIf RandomNum = 43 Then : WType = "Cleaver"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Extra-wide Shortsword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d4+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("49 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Tharsis, Narsis"
            ElseIf RandomNum = 44 Then : WType = "Falx"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Half-Polearm/Half-Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 85 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("85")
                End If
                Worth = comworth("33 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 45 Then : WType = "Rhomphaia"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Half-Polearm/Half-Sword")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 70 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("70")
                End If
                Worth = comworth("18 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not purchasable"
            ElseIf RandomNum = 46 Then : WType = "Bardiche"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 60 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("60")
                End If
                Worth = comworth("1 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 47 Then : WType = "Bill"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 68 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("68")
                End If
                Worth = comworth("5 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 48 Then : WType = "Glaive"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 40 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("40")
                End If
                Worth = comworth("8 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 49 Then : WType = "Guisarme"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 80 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("80")
                End If
                Worth = comworth("30 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 50 Then : WType = "Voulge"
                GatherMaterialInfo(Material)
                DamageType = "Slash"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 55 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("55")
                End If
                Worth = comworth("15 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "New Saellem"
            ElseIf RandomNum = 51 Then : WType = "Staff"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Long Stick")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("15 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 52 Then : WType = "Morning Star"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Stick with 3 chained spike balls")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 10 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("10")
                End If
                Worth = comworth("28 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Tharsis"
            ElseIf RandomNum = 53 Then : WType = "Macuahuiti"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Club with glass shards")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 90 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("90")
                End If
                Worth = comworth("88 Sovern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 54 Then : WType = "Mace"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Club")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("70 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 55 Then : WType = "Flail"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Stick with 1 chained spike ball")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 5 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("5")
                End If
                Worth = comworth("2 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 56 Then : WType = "Hammer"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Large hammer")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 15 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("15")
                End If
                Worth = comworth("50 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 57 Then : WType = "War Hammer"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Long-handled Large Hammer")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 35 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("35")
                End If
                Worth = comworth("15 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Tharsis, Crecia, Narsis"
            ElseIf RandomNum = 58 Then : WType = "Scepter"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Medium-sized Stick")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("50 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Northern Reach"
            ElseIf RandomNum = 59 Then : WType = "Club"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Club")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("3 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 60 Then : WType = "Blackjack"
                GatherMaterialInfo(Material)
                DamageType = "Bash"
                ExtendedDesc = LTrim("Smaller Club")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 22 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("22")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Narsis"
            ElseIf RandomNum = 61 Then : WType = "Eku"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("Boat Paddle")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 65 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("65")
                End If
                Worth = comworth("20 Vern", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Crecia, Dillan, Doonan"
            ElseIf RandomNum = 62 Then : WType = "Sai"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("3-pronged short sword")
                ClassSpecific = LTrim("Yes")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 10 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("10")
                End If
                Worth = comworth("30 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 63 Then : WType = "Halberd"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("Polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d12+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("20 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            ElseIf RandomNum = 64 Then : WType = "Trident"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("3-pronged polearm")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d10+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 15 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("15")
                End If
                Worth = comworth("44 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 65 Then : WType = "Kukri"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("Machete Dagger")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 25 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("25")
                End If
                Worth = comworth("29 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "The Bleak"
            ElseIf RandomNum = 66 Then : WType = "Lathi"
                Material = "Bamboo"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("Bamboo Stick")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d8+" + pierce)
                TwoHanded = LTrim("Yes")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("4 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Not Purchasable"
            ElseIf RandomNum = 67 Then : WType = "Whip"
                Material = "Leather"
                GatherMaterialInfo(Material)
                DamageType = "Exotic"
                ExtendedDesc = LTrim("Leather whip")
                ClassSpecific = LTrim("No")
                AOE = LTrim("Melee")
                Damage = LTrim("1d6+" + pierce)
                TwoHanded = LTrim("No")
                If Val(requiredlevel) > 0 Then
                    LvlReq = LTrim(requiredlevel)
                Else
                    LvlReq = LTrim("0")
                End If
                Worth = comworth("3 Dover", value)
                If affects <> "" Then If AddAffects <> "" Then AddAffects = "," + AddAffects
                If affects & AddAffects = "" Then affects = "None"
                PurchaseArea = "Any"
            End If
            Dim Vowel As String
            If LCase(Mid(WType, 1, 1)) = "a" Then : Vowel = "An "
            ElseIf LCase(Mid(WType, 1, 1)) = "e" Then : Vowel = "An "
            ElseIf LCase(Mid(WType, 1, 1)) = "i" Then : Vowel = "An "
            ElseIf LCase(Mid(WType, 1, 1)) = "o" Then : Vowel = "An "
            ElseIf LCase(Mid(WType, 1, 1)) = "u" Then : Vowel = "An "
            Else : Vowel = "A " : End If
            If Mid(WType, Len(WType) - 1, 1) = "s" Then Vowel = ""
            iSHORT = Vowel + WType
            If LCase(Mid(Craftsmanship, 1, 1)) = "a" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "e" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "i" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "o" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "u" Then : Vowel = "An "
            Else : Vowel = "A " : End If
            If Mid(WType, Len(WType) - 1, 1) = "s" Then Vowel = ""
            iITEMN = Replace(QualityFlag, "/c", "") + Vowel + Craftsmanship + RTrim(" " + daprefix) + " " + Material + " " + WType + RTrim(" " + dasuffix)
            iLONGD = Vowel + Craftsmanship + RTrim(" " + daprefix) + " " + Material + " " + WType + RTrim(" " + dasuffix) + " is here."
            iLOOKD = ExtendedDesc
            If AOE = "Melee" Then
                iEQUIP = "Weapon"
            Else
                iEQUIP = "Range"
            End If
            durability = Replace(durability, "%", "")
            For tmp0 = 1 To Len(durability) Step 1
                If Mid(durability, tmp0, 1) = ":" Then
                    While Len(Mid(durability, 1, tmp0 - 1)) < 3
                        durability = "0" + durability
                        tmp0 = InStr(durability, ":")
                    End While
                    While Len(Mid(durability, tmp0 + 1, Len(durability))) < 3
                        durability = Mid(durability, 1, tmp0) + "0" + Mid(durability, tmp0 + 1, Len(durability))
                    End While
                End If
            Next
            While Len(LvlReq) < 3
                LvlReq = "0" + LvlReq
            End While
            iPARID = "2," + MainProgram.AddSpaceL(LTrim(Str(WeaponNum)), 2, 1) + "," + MainProgram.AddSpaceL(LTrim(Str(MaterialNum)), 2, 1) + "," + MainProgram.AddSpaceL(LTrim(Str(CraftsmanshipNum)), 2, 1) + "," + LTrim(Str(QualityNum)) + "," + Mid(DamageType, 1, 1) + "," + ClassSpecific + "," + Mid(AOE, 1, 1) + "," + Damage + "," + Mid(TwoHanded, 1, 1) + "," + LvlReq + "," + weight + "," + durability + "," + affects + "," + PurchaseArea
            iWORTH = LTrim(Replace(Worth, "+", ""))
        ElseIf Type = "Armor" Then
            iITEMT = "5"
            iITEMC = "00"
            GatherMaterialInfo(Material)
            Dim ArmorType As String = LTrim(Str(sr.Next(0, 139)))
            If ArmorType = lastgeneratedarmor Then
                ArmorType = LTrim(Str(sr.Next(0, 139)))
            Else
                lastgeneratedarmor = ArmorType
            End If
            If ArmorType = "0" Then
                SNDArmorFormat("Crown", "Head", "Citizen Rank 6+", "60", "No", "1", "0", "1", "1", "3", "Not Purchasable", "10 Sovern", "No", "5")
            ElseIf ArmorType = "1" Then
                SNDArmorFormat("Chapeau", "Head", "Citizen Rank 3+", "40", "No", "1", "0", "1", "1", "0", "Not Purchasable", "18 Dover", "No", "2")
            ElseIf ArmorType = "2" Then
                SNDArmorFormat("Chaplet", "Head", "Citizen Rank 2+", "20", "No", "1", "0", "1", "0", "0", "Not Purchasable", "22 Dover", "No", "3")
            ElseIf ArmorType = "3" Then
                SNDArmorFormat("Coif", "Head", "Heavy", "15", "No", "1", "1", "0", "1", "0", "Kingdom of Mene, Jewall, Dillan", "18 Dover", "Yes", "5")
            ElseIf ArmorType = "4" Then
                SNDArmorFormat("Coronet", "Head", "Citizen Rank 4+", "30", "No", "1", "0", "1", "1", "1", "Not Purchasable", "50 Dover", "No", "4")
            ElseIf ArmorType = "5" Then
                SNDArmorFormat("Cowl", "Head", "Light", "20", "No", "0", "0", "1", "1", "0", "Any", "70 Vern", "Yes", "1")
            ElseIf ArmorType = "6" Then
                SNDArmorFormat("Spectacles", "Head", "None", "No", "75", "4", "5", "2", "8", "2", "Tharsis", "3 Sovern", "No", "1")
            ElseIf ArmorType = "7" Then
                SNDArmorFormat("Tiara", "Head", "None", "30", "Female", "1", "2", "3", "1", "0", "Tharsis, Narsis, Crecia", "1 Dover", "No", "1")
            ElseIf ArmorType = "8" Then
                SNDArmorFormat("Eyeglasses", "Head", "None", "50", "No", "3", "2", "1", "3", "1", "Tharsis", "4 Sovern", "No", "1")
            ElseIf ArmorType = "9" Then
                SNDArmorFormat("Monocle", "Head", "None", "80", "No", "3", "4", "1", "7", "7", "Tharsis", "1 Sovern", "No", "1")
            ElseIf ArmorType = "10" Then
                SNDArmorFormat("Wreath", "Head", "Citizen Rank 7+", "80", "No", "3", "3", "3", "3", "3", "Not Purchasable", "10 Dover", "No", "2")
            ElseIf ArmorType = "11" Then
                SNDArmorFormat("Circlet", "Head", "None", "30", "No", "1", "2", "1", "1", "2", "Tharsis, Narsis, Crecia", "5 Dover", "No", "3")
            ElseIf ArmorType = "12" Then
                SNDArmorFormat("Mask", "Head", "None", "25", "No", "2", "1", "1", "4", "1", "Any", "1 Dover", "No", "2")
            ElseIf ArmorType = "13" Then
                SNDArmorFormat("Headdress", "Head", "Citizen Rank 8", "90", "No", "5", "4", "8", "4", "6", "Not Purchasable", "10 Sovern", "No", "4")
            ElseIf ArmorType = "14" Then
                SNDArmorFormat("Hood", "Head", "Light", "5", "No", "4", "1", "1", "1", "0", "Any", "30 Vern", "Yes", "1")
            ElseIf ArmorType = "15" Then
                SNDArmorFormat("Cap", "Head", "Light", "0", "No", "1", "1", "1", "0", "0", "Any", "15 Vern", "Yes", "1")
            ElseIf ArmorType = "16" Then
                SNDArmorFormat("Helm", "Head", "Heavy", "15", "No", "1", "1", "1", "1", "2", "Any", "15 Dover", "Yes", "6")
            ElseIf ArmorType = "17" Then
                SNDArmorFormat("Full Helm", "Head", "Heavy", "25", "No", "2", "2", "2", "2", "3", "Kingdom of Mene, Jewall, Tharsis", "70 Dover", "Yes", "7")
            ElseIf ArmorType = "18" Then
                SNDArmorFormat("Horned Helm", "Head", "Heavy", "45", "No", "3", "3", "3", "3", "4", "Kingdom of Mene, Narsis, Dupree", "80 Dover", "Yes", "8")
            ElseIf ArmorType = "19" Then
                SNDArmorFormat("Skull Cap", "Head", "Medium or Heavy", "15", "No", "1", "2", "1", "2", "0", "Northern Reach", "15 Dover", "Yes", "4")
            ElseIf ArmorType = "20" Then
                SNDArmorFormat("Face Guard", "Head", "Heavy", "20", "No", "0", "3", "0", "1", "2", "Narsis", "25 Dover", "Yes", "4")
            ElseIf ArmorType = "21" Then
                SNDArmorFormat("Face Plate", "Head", "Heavy", "30", "No", "0", "4", "0", "2", "3", "Narsis, Crecia", "35 Dover", "Yes", "5")
            ElseIf ArmorType = "22" Then
                SNDArmorFormat("Gorget", "Neck", "Medium", "25", "Male", "0", "4", "2", "4", "1", "Not Purchasable", "29 Dover", "Yes", "3")
            ElseIf ArmorType = "23" Then
                SNDArmorFormat("Amulet", "Neck", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "10 Dover", "No", "0")
            ElseIf ArmorType = "24" Then
                SNDArmorFormat("Choker", "Neck", "None", "15", "No", "0", "0", "0", "0", "0", "Crecia, Dillan, Doonan", "25 Dover", "No", "0")
            ElseIf ArmorType = "25" Then
                SNDArmorFormat("Locket", "Neck", "None", "10", "No", "0", "0", "0", "0", "0", "Any", "20 Dover", "No", "0")
            ElseIf ArmorType = "26" Then
                SNDArmorFormat("Medallion", "Neck", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "10 Dover", "No", "0")
            ElseIf ArmorType = "27" Then
                SNDArmorFormat("Neckband", "Neck", "Light", "20", "No", "0", "0", "0", "0", "0", "Any", "30 Dover", "Yes", "0")
            ElseIf ArmorType = "28" Then
                SNDArmorFormat("Necklace", "Neck", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "10 Dover", "No", "0")
            ElseIf ArmorType = "29" Then
                SNDArmorFormat("Mark", "Neck", "None", "10", "No", "0", "0", "0", "0", "0", "Any", "20 Dover", "No", "0")
            ElseIf ArmorType = "30" Then
                SNDArmorFormat("Pendant", "Neck", "None", "35", "No", "0", "0", "0", "0", "0", "Any", "45 Dover", "No", "0")
            ElseIf ArmorType = "31" Then
                SNDArmorFormat("Icon", "Neck", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "10 Dover", "No", "0")
            ElseIf ArmorType = "32" Then
                SNDArmorFormat("Talisman", "Neck", "None", "20", "No", "0", "0", "0", "0", "0", "Any", "10 Dover", "No", "0")
            ElseIf ArmorType = "33" Then
                SNDArmorFormat("Amice", "Shoulders", "Light", "0", "No", "1", "1", "2", "1", "1", "Crecia, New Saellem, Dupree", "87 Vern", "Yes", "3")
            ElseIf ArmorType = "34" Then
                SNDArmorFormat("Pauldrons", "Shoulders", "Medium", "0", "No", "8", "2", "1", "3", "2", "Any", "3 Dover", "Yes", "5")
            ElseIf ArmorType = "35" Then
                SNDArmorFormat("Mantle", "Shoulders", "Light or Medium", "0", "No", "4", "1", "1", "2", "1", "Any", "1 Dover", "Yes", "4")
            ElseIf ArmorType = "36" Then
                SNDArmorFormat("Studded Mantle", "Shoulders", "Medium", "15", "No", "7", "1", "2", "2", "3", "Any", "8 Dover", "Yes", "5")
            ElseIf ArmorType = "37" Then
                SNDArmorFormat("Shoulder Pads", "Shoulders", "Light or Medium", "0", "No", "4", "2", "1", "1", "3", "Any", "2 Dover", "Yes", "3")
            ElseIf ArmorType = "38" Then
                SNDArmorFormat("Spaulders", "Shoulders", "Medium", "0", "No", "5", "2", "1", "2", "1", "Crecia, Winebridge, New Saellem", "55 Vern", "Yes", "3")
            ElseIf ArmorType = "39" Then
                SNDArmorFormat("Scaled Shoulders", "Shoulders", "Heavy", "30", "No", "10", "8", "6", "4", "4", "Kingdom of Mene, Mellowdeep", "88 Dover", "Yes", "8")
            ElseIf ArmorType = "40" Then
                SNDArmorFormat("Splint Shoulders", "Shoulders", "Exotic", "40", "No", "11", "10", "9", "6", "6", "Not Purchasable", "1 Sovern", "Yes", "7")
            ElseIf ArmorType = "41" Then
                SNDArmorFormat("Half-plate Shoulders", "Shoulders", "Heavy", "50", "No", "13", "11", "12", "9", "7", "Any", "44 Dover", "Yes", "6")
            ElseIf ArmorType = "42" Then
                SNDArmorFormat("Plate Shoulders", "Shoulders", "Heavy", "60", "No", "14", "12", "12", "12", "12", "Crecia, Tharsis, Jewall", "75 Dover", "Yes", "9")
            ElseIf ArmorType = "43" Then
                SNDArmorFormat("Armlets", "Arms", "Light or Medium", "0", "No", "5", "2", "3", "1", "0", "Any", "66 Vern", "Yes", "3")
            ElseIf ArmorType = "44" Then
                SNDArmorFormat("Armband", "Arms", "Light or Medium", "0", "No", "0", "0", "0", "4", "1", "Any", "35 Vern", "Yes", "4")
            ElseIf ArmorType = "45" Then
                SNDArmorFormat("Arm-guards", "Arms", "Medium or Heavy", "20", "No", "6", "4", "0", "4", "3", "Any", "2 Dover", "Yes", "4")
            ElseIf ArmorType = "46" Then
                SNDArmorFormat("Arm Wraps", "Arms", "Light or Medium", "0", "No", "3", "2", "0", "2", "1", "Any", "45 Vern", "Yes", "2")
            ElseIf ArmorType = "47" Then
                SNDArmorFormat("Cuffs", "Wrists", "Light, Medium, or Heavy", "15", "No", "2", "1", "1", "0", "3", "Harrow Lowlands, Sands of Bone", "19 Dover", "Yes", "3")
            ElseIf ArmorType = "48" Then
                SNDArmorFormat("Wristband", "Wrists", "Light or Medium", "0", "No", "1", "2", "0", "1", "1", "Any", "5 Dover", "Yes", "4")
            ElseIf ArmorType = "49" Then
                SNDArmorFormat("Bracers", "Wrists", "Medium or Heavy", "5", "No", "3", "1", "1", "0", "0", "Any", "9 Dover", "Yes", "2")
            ElseIf ArmorType = "50" Then
                SNDArmorFormat("Bracelet", "Wrists", "Light", "0", "No", "0", "0", "1", "2", "0", "Any", "22 Vern", "Yes", "2")
            ElseIf ArmorType = "51" Then
                SNDArmorFormat("Shackles", "Wrists", "Heavy", "20", "No", "3", "4", "2", "1", "1", "Crecia, Tharsis, Narsis, Jewall", "25 Dover", "Yes", "3")
            ElseIf ArmorType = "52" Then
                SNDArmorFormat("Bindings", "Wrists", "Light, Medium, or Heavy", "10", "No", "2", "2", "1", "1", "0", "Narsis, Mellowdeep Marsh", "14 Dover", "Yes", "2")
            ElseIf ArmorType = "53" Then
                SNDArmorFormat("Gloves", "Hands", "Light or Medium", "0", "No", "0", "2", "2", "4", "1", "Any", "18 Vern", "Yes", "1")
            ElseIf ArmorType = "54" Then
                SNDArmorFormat("Mittens", "Hands", "Light", "0", "No", "0", "1", "1", "1", "0", "Northern Reach", "22 Vern", "Yes", "2")
            ElseIf ArmorType = "55" Then
                SNDArmorFormat("Handwraps", "Hands", "Light", "10", "No", "1", "1", "1", "1", "1", "Temples of The Dragon", "14 Dover", "Yes", "2")
            ElseIf ArmorType = "56" Then
                SNDArmorFormat("Handguards", "Hands", "Medium or Heavy", "20", "No", "2", "2", "2", "2", "2", "Any", "22 Dover", "Yes", "3")
            ElseIf ArmorType = "57" Then
                SNDArmorFormat("Gauntlets", "Hands", "Heavy", "30", "No", "3", "4", "4", "5", "2", "Any", "33 Dover", "Yes", "4")
            ElseIf ArmorType = "58" Then
                SNDArmorFormat("Chainmail Gauntlets", "Hands", "Heavy", "40", "No", "5", "4", "4", "3", "3", "Any", "49 Dover", "Yes", "5")
            ElseIf ArmorType = "59" Then
                SNDArmorFormat("Scalemail Gauntlets", "Hands", "Heavy", "30", "No", "3", "1", "4", "3", "3", "Kingdom of Mene, Mellowdeep Marsh", "85 Dover", "Yes", "6")
            ElseIf ArmorType = "60" Then
                SNDArmorFormat("Platemail Gauntlets", "Hands", "Heavy", "60", "No", "6", "5", "4", "5", "5", "Crecia, Tharsis, Jewall", "75 Dover", "Yes", "5")
            ElseIf ArmorType = "61" Then
                SNDArmorFormat("Platemail", "Chest", "Heavy", "60", "No", "9", "11", "9", "7", "5", "Crecia, Tharsis, Jewall", "6 Sovern", "Yes", "20")
            ElseIf ArmorType = "62" Then
                SNDArmorFormat("Ringmail", "Chest", "Heavy", "35", "No", "7", "6", "6", "5", "2", "Harrow Lowlands, Winebridge", "4 Sovern", "Yes", "18")
            ElseIf ArmorType = "63" Then
                SNDArmorFormat("Chain Cuirass", "Chest", "Heavy", "40", "No", "9", "8", "8", "5", "2", "Any", "4 Sovern", "Yes", "15")
            ElseIf ArmorType = "64" Then
                SNDArmorFormat("Half=plate", "Chest", "Heavy", "50", "No", "9", "8", "9", "8", "4", "Any", "5 Sovern", "Yes", "17")
            ElseIf ArmorType = "65" Then
                SNDArmorFormat("Chestplate", "Chest", "Heavy", "55", "No", "9", "10", "9", "7", "4", "Any", "5 Sovern", "Yes", "15")
            ElseIf ArmorType = "66" Then
                SNDArmorFormat("Chestguard", "Chest", "Medium", "30", "No", "3", "2", "2", "4", "2", "Any", "3 Sovern", "Yes", "14")
            ElseIf ArmorType = "67" Then
                SNDArmorFormat("Scalemail", "Chest", "Heavy", "30", "No", "4", "3", "5", "4", "4", "Kingdom of Mene, Mellowdeep Marsh", "8 Sovern", "Yes", "18")
            ElseIf ArmorType = "68" Then
                SNDArmorFormat("Splintmail", "Chest", "Exotic", "40", "No", "8", "5", "7", "3", "4", "Not Purchasable", "10 Sovern", "Yes", "17")
            ElseIf ArmorType = "69" Then
                SNDArmorFormat("Studded Tunic", "Chest", "Medium", "15", "No", "2", "1", "1", "4", "1", "Any", "80 Dover", "Yes", "8")
            ElseIf ArmorType = "70" Then
                SNDArmorFormat("Tunic", "Chest", "Light or Medium", "0", "No", "1", "1", "1", "2", "1", "Any", "4 Dover", "Yes", "7")
            ElseIf ArmorType = "71" Then
                SNDArmorFormat("Vestment", "Chest", "Light", "0", "No", "1", "0", "1", "1", "1", "Any", "1 Dover", "Yes", "8")
            ElseIf ArmorType = "72" Then
                SNDArmorFormat("Hauberk", "Chest", "Exotic", "85", "No", "15", "13", "11", "12", "10", "Plains of Endless Despair", "15 Sovern", "Yes", "19")
            ElseIf ArmorType = "73" Then
                SNDArmorFormat("Field Plate", "Chest", "Heavy", "70", "No", "13", "11", "13", "10", "8", "Not Purchasable", "18 Sovern", "Yes", "20")
            ElseIf ArmorType = "74" Then
                SNDArmorFormat("Banded Mail", "Chest", "Heavy", "60", "No", "11", "9", "5", "8", "9", "Not Purchasable", "23 Sovern", "Yes", "18")
            ElseIf ArmorType = "75" Then
                SNDArmorFormat("Brigandine Armor", "Chest", "Exotic", "90", "No", "15", "13", "15", "14", "15", "Not Purchasable", "42 Sovern", "Yes", "25")
            ElseIf ArmorType = "76" Then
                SNDArmorFormat("Robe", "Chest", "Light", "0", "No", "1", "1", "1", "1", "1", "Any", "1 Dover", "Yes", "4")
            ElseIf ArmorType = "77" Then
                SNDArmorFormat("Raiment", "Chest", "Light", "20", "No", "3", "3", "3", "3", "3", "Narsis, Crecia, Kingdom of Mene", "10 Dover", "Yes", "5")
            ElseIf ArmorType = "78" Then
                SNDArmorFormat("Tabard", "Chest", "Light", "1", "No", "2", "1", "1", "0", "0", "Any", "4 Dover", "Yes", "3")
            ElseIf ArmorType = "79" Then
                SNDArmorFormat("Doublet", "Chest", "Light", "5", "Female", "1", "0", "1", "1", "0", "Crecia, Doonan, Dupree, Moran", "89 Vern", "Yes", "4")
            ElseIf ArmorType = "80" Then
                SNDArmorFormat("Chemise", "Chest", "Light", "5", "Female", "1", "1", "0", "1", "0", "New Saellem, Dillan, Winebridge", "70 Vern", "Yes", "5")
            ElseIf ArmorType = "81" Then
                SNDArmorFormat("Lorica Segmentata", "Chest", "Exotic", "75", "No", "15", "15", "13", "13", "14", "Not Purchasable", "202 Sovern", "Yes", "25")
            ElseIf ArmorType = "82" Then
                SNDArmorFormat("Lamellar", "Chest", "Exotic", "80", "No", "15", "15", "15", "14", "14", "Not Purchasable", "140 Sovern", "Yes", "24")
            ElseIf ArmorType = "83" Then
                SNDArmorFormat("Shawl", "Back", "Light", "0", "No", "1", "1", "0", "1", "0", "Any", "18 Vern", "Yes", "3")
            ElseIf ArmorType = "84" Then
                SNDArmorFormat("Cape", "Back", "Light", "5", "No", "3", "3", "1", "0", "0", "Any", "80 Vern", "Yes", "2")
            ElseIf ArmorType = "85" Then
                SNDArmorFormat("Capelet", "Back", "Light", "0", "No", "2", "2", "1", "0", "0", "Crecia", "50 Vern", "Yes", "3")
            ElseIf ArmorType = "86" Then
                SNDArmorFormat("Cloak", "Back", "Light", "10", "No", "4", "4", "2", "1", "0", "Any", "1 Dover", "Yes", "3")
            ElseIf ArmorType = "87" Then
                SNDArmorFormat("Heavy Cloak", "Back", "Light", "20", "No", "5", "5", "2", "1", "0", "Any", "3 Dover", "Yes", "5")
            ElseIf ArmorType = "88" Then
                SNDArmorFormat("Battle Cloak", "Back", "Light", "30", "No", "6", "6", "3", "2", "1", "Any", "10 Dover", "Yes", "4")
            ElseIf ArmorType = "89" Then
                SNDArmorFormat("Royal Cloak", "Back", "Light", "40", "No", "7", "7", "4", "4", "0", "Crecia, Tharsis, Narsis, Jewall", "1 Sovern", "Yes", "4")
            ElseIf ArmorType = "90" Then
                SNDArmorFormat("Girdle", "Waist", "Heavy", "10", "No", "3", "0", "3", "2", "2", "Any", "10 Dover", "Yes", "5")
            ElseIf ArmorType = "91" Then
                SNDArmorFormat("Belt", "Waist", "Medium", "5", "No", "1", "0", "0", "1", "2", "Any", "3 Dover", "Yes", "4")
            ElseIf ArmorType = "92" Then
                SNDArmorFormat("Cord", "Waist", "Light or Medium", "0", "No", "2", "0", "3", "1", "4", "Any", "18 Vern", "Yes", "2")
            ElseIf ArmorType = "93" Then
                SNDArmorFormat("Waistwrap", "Waist", "Light or Medium", "10", "No", "1", "0", "2", "2", "1", "Not Purchasable", "40 Vern", "Yes", "2")
            ElseIf ArmorType = "94" Then
                SNDArmorFormat("Sash", "Waist", "Light", "0", "No", "1", "0", "1", "0", "2", "Any", "35 Vern", "Yes", "2")
            ElseIf ArmorType = "95" Then
                SNDArmorFormat("Genouillere", "Legs", "Medium or Heavy", "15", "No", "3", "0", "5", "3", "0", "Not Purchasable", "18 Dover", "Yes", "11")
            ElseIf ArmorType = "96" Then
                SNDArmorFormat("Bloomers", "Legs", "Light", "5", "No", "1", "0", "0", "1", "0", "Doonan, Moran, Mellowdeep Marsh", "75 Vern", "Yes", "2")
            ElseIf ArmorType = "97" Then
                SNDArmorFormat("Breeches", "Legs", "Light", "5", "No", "0", "1", "1", "0", "0", "New Saellem, Winebridge, Dillan", "82 Vern", "Yes", "2")
            ElseIf ArmorType = "98" Then
                SNDArmorFormat("Trousers", "Legs", "Light", "0", "Male", "0", "0", "1", "1", "0", "Any", "18 Vern", "Yes", "3")
            ElseIf ArmorType = "99" Then
                SNDArmorFormat("Leggings", "Legs", "Medium or Heavy", "0", "No", "1", "4", "0", "2", "1", "Any", "3 Dover", "Yes", "3")
            ElseIf ArmorType = "100" Then
                SNDArmorFormat("Legguards", "Legs", "Heavy", "10", "No", "2", "4", "1", "1", "1", "Any", "18 Dover", "Yes", "4")
            ElseIf ArmorType = "101" Then
                SNDArmorFormat("Skirt", "Legs", "Light", "0", "Female", "0", "1", "1", "1", "0", "Any", "3 Dover", "Yes", "3")
            ElseIf ArmorType = "102" Then
                SNDArmorFormat("Split Skirt", "Legs", "Light", "0", "Female", "1", "1", "1", "0", "0", "New Saellem, Moran", "2 Dover", "Yes", "3")
            ElseIf ArmorType = "103" Then
                SNDArmorFormat("Tights", "Legs", "Light", "0", "No", "1", "0", "0", "0", "0", "Crecia, Narsis", "40 Vern", "Yes", "3")
            ElseIf ArmorType = "104" Then
                SNDArmorFormat("Pantaloons", "Legs", "Light", "0", "Male", "1", "0", "0", "1", "1", "Crecia", "30 Vern", "Yes", "3")
            ElseIf ArmorType = "105" Then
                SNDArmorFormat("Scale Leggings", "Legs", "Heavy", "30", "No", "7", "8", "3", "1", "5", "Kingdom of Mene, Mellowdeep Marsh", "89 Dover", "Yes", "14")
            ElseIf ArmorType = "106" Then
                SNDArmorFormat("Splint Leggings", "Legs", "Exotic", "40", "No", "10", "9", "5", "3", "5", "Not Purchasable", "2 Sovern", "Yes", "13")
            ElseIf ArmorType = "107" Then
                SNDArmorFormat("Half-Plate Leggings", "Legs", "Heavy", "50", "No", "10", "10", "9", "4", "8", "Any", "54 Dover", "Yes", "15")
            ElseIf ArmorType = "108" Then
                SNDArmorFormat("Plate Leggings", "Legs", "Heavy", "60", "No", "10", "10", "10", "9", "10", "Crecia, Tharsis, Jewall", "67 Dover", "Yes", "16")
            ElseIf ArmorType = "109" Then
                SNDArmorFormat("Chainmail leggings", "Legs", "Heavy", "40", "No", "5", "10", "3", "5", "9", "Any", "49 Dover", "Yes", "14")
            ElseIf ArmorType = "110" Then
                SNDArmorFormat("Greaves", "Legs", "Heavy", "20", "No", "4", "6", "3", "3", "4", "Any", "25 Dover", "Yes", "13")
            ElseIf ArmorType = "111" Then
                SNDArmorFormat("Slippers", "Feet", "Light", "0", "No", "1", "1", "0", "1", "1", "Any", "33 Vern", "No", "3")
            ElseIf ArmorType = "112" Then
                SNDArmorFormat("Sandals", "Feet", "Light", "0", "No", "1", "1", "1", "0", "1", "Sands of Bone, Crecia, Dillan", "10 Vern", "No", "2")
            ElseIf ArmorType = "113" Then
                SNDArmorFormat("Stalkers", "Feet", "Light or Medium", "10", "No", "2", "2", "2", "1", "2", "Narsis, Tharsis, Darkwood", "18 Dover", "No", "2")
            ElseIf ArmorType = "114" Then
                SNDArmorFormat("Footguards", "Feet", "Medium or Heavy", "20", "No", "3", "4", "2", "2", "1", "Any", "29 Dover", "Yes", "2")
            ElseIf ArmorType = "115" Then
                SNDArmorFormat("Scale Boots", "Feet", "Heavy", "30", "No", "3", "5", "3", "3", "1", "Kingdom of Mene, Mellowdeep", "88 Dover", "Yes", "4")
            ElseIf ArmorType = "116" Then
                SNDArmorFormat("Splint Boots", "Feet", "Exotic", "40", "No", "5", "6", "4", "4", "2", "Not Purchasable", "1 Sovern", "Wood", "4")
            ElseIf ArmorType = "117" Then
                SNDArmorFormat("Half-plate Boots", "Feet", "Heavy", "50", "No", "8", "5", "2", "4", "3", "Narsis, New Saellem, Doonan", "55 Dover", "Yes", "7")
            ElseIf ArmorType = "118" Then
                SNDArmorFormat("Plate Boots", "Feet", "Heavy", "60", "No", "8", "8", "5", "8", "4", "Crecia, Tharsis, Jewall", "65 Dover", "Yes", "8")
            ElseIf ArmorType = "119" Then
                SNDArmorFormat("Anklet", "Feet", "None", "0", "Female", "1", "0", "0", "0", "0", "Kingdom of Mene, Crecia, Doonan", "40 Vern", "No", "0")
            ElseIf ArmorType = "120" Then
                SNDArmorFormat("Boots", "Feet", "Medium or Heavy", "0", "No", "1", "2", "1", "0", "1", "Any", "1 Dover", "Yes", "2")
            ElseIf ArmorType = "121" Then
                SNDArmorFormat("Long Boots", "Feet", "Medium or Heavy", "30", "No", "2", "4", "3", "1", "2", "Mellowdeep Marsh, Moran", "38 Dover", "Yes", "3")
            ElseIf ArmorType = "122" Then
                SNDArmorFormat("Footguards", "Feet", "Light", "15", "No", "1", "1", "1", "1", "1", "Jewall, Tharsis, New Saellem", "16 Dover", "No", "3")
            ElseIf ArmorType = "123" Then
                SNDArmorFormat("Ring", "Finger", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "50 Dover", "No", "0")
            ElseIf ArmorType = "124" Then
                SNDArmorFormat("Band", "Finger", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "50 Dover", "No", "0")
            ElseIf ArmorType = "125" Then
                SNDArmorFormat("Thumb Ring", "Finger", "None", "0", "Female", "0", "0", "0", "0", "0", "Plains of Endless Despair", "50 Dover", "No", "0")
            ElseIf ArmorType = "126" Then
                SNDArmorFormat("Wedding Ring", "Finger", "None", "0", "No", "0", "0", "0", "0", "0", "Any", "50 Dover", "No", "0")
            ElseIf ArmorType = "127" Then
                SNDArmorFormat("Engagement Ring", "Finger", "None", "0", "Female", "0", "0", "0", "0", "0", "Any", "50 Dover", "No", "0")
            ElseIf ArmorType = "128" Then
                SNDArmorFormat("Signet Ring", "Finger", "None", "0", "Male", "0", "0", "0", "0", "0", "Not Purchasable", "50 Dover", "No", "0")
            ElseIf ArmorType = "129" Then
                SNDArmorFormat("Blood Ring", "Finger", "None", "0", "Male", "0", "0", "0", "0", "0", "Narsis", "50 Dover", "No", "0")
            ElseIf ArmorType = "130" Then
                SNDArmorFormat("Aegis", "Shield", "Medium", "60", "No", "15", "14", "14", "15", "15", "Tharsis, Narsis, Crecia", "69 Dover", "Wood", "10")
            ElseIf ArmorType = "131" Then
                SNDArmorFormat("Scutum", "Shield", "Heavy", "35", "No", "9", "9", "9", "9", "9", "New Saellem, Moran", "2 Sovern", "Wood", "10")
            ElseIf ArmorType = "132" Then
                SNDArmorFormat("Targe", "Shield", "Medium", "20", "No", "8", "8", "8", "8", "8", "Doonan, Dupree", "29 Dover", "Wood", "10")
            ElseIf ArmorType = "133" Then
                SNDArmorFormat("Roundel", "Shield", "Light", "50", "No", "12", "12", "12", "13", "12", "Not Purchasable", "50 Dover", "Wood", "10")
            ElseIf ArmorType = "134" Then
                SNDArmorFormat("Buckler", "Shield", "Light", "0", "No", "5", "5", "5", "5", "4", "Any", "10 Dover", "Wood", "10")
            ElseIf ArmorType = "135" Then
                SNDArmorFormat("Disc Shield", "Shield", "Heavy", "70", "No", "18", "17", "15", "15", "15", "Moran, Criss Beach", "7 Sovern", "Metal", "15")
            ElseIf ArmorType = "136" Then
                SNDArmorFormat("Heater Shield", "Shield", "Exotic", "80", "No", "18", "18", "19", "16", "16", "Not Purchasable", "9 Sovern", "Gem", "18")
            ElseIf ArmorType = "137" Then
                SNDArmorFormat("Bulwark", "Shield", "Medium or Heavy", "40", "No", "10", "10", "9", "9", "9", "Mellowdeep Marsh", "40 Dover", "Wood", "10")
            ElseIf ArmorType = "138" Then
                SNDArmorFormat("Tower Shield", "Shield", "Heavy", "60", "No", "14", "13", "15", "15", "16", "Tharsis, Narsis, Jewall", "11 Sovern", "Wood", "10")
            ElseIf ArmorType = "139" Then
                SNDArmorFormat("Kite Shield", "Shield", "Exotic", "75", "No", "17", "18", "16", "16", "15", "Not Purchasable", "17 Sovern", "Wood", "10")
            End If
            Dim Vowel As String
            If LCase(Mid(thearmortype, 1, 1)) = "a" Then : Vowel = "An "
            ElseIf LCase(Mid(thearmortype, 1, 1)) = "e" Then : Vowel = "An "
            ElseIf LCase(Mid(thearmortype, 1, 1)) = "i" Then : Vowel = "An "
            ElseIf LCase(Mid(thearmortype, 1, 1)) = "o" Then : Vowel = "An "
            ElseIf LCase(Mid(thearmortype, 1, 1)) = "u" Then : Vowel = "An "
            Else : Vowel = "A " : End If
            If Mid(thearmortype, Len(thearmortype), 1) = "s" Then Vowel = ""
            iSHORT = Vowel + thearmortype
            If LCase(Mid(Craftsmanship, 1, 1)) = "a" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "e" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "i" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "o" Then : Vowel = "An "
            ElseIf LCase(Mid(Craftsmanship, 1, 1)) = "u" Then : Vowel = "An "
            Else : Vowel = "A " : End If
            If Mid(thearmortype, Len(thearmortype), 1) = "s" Then Vowel = ""
            iITEMN = Replace(QualityFlag, "/c", "") + Vowel + Craftsmanship + RTrim(" " + daprefix) + " " + Material + " " + thearmortype + RTrim(" " + dasuffix)
            iLONGD = Vowel + Craftsmanship + RTrim(" " + daprefix) + " " + Material + " " + thearmortype + RTrim(" " + dasuffix) + " is here."
            iLOOKD = armorlook
            iEQUIP = armorequip
            durability = Replace(durability, "%", "")
            For tmp0 = 1 To Len(durability) Step 1
                If Mid(durability, tmp0, 1) = ":" Then
                    While Len(Mid(durability, 1, tmp0 - 1)) < 3
                        durability = "0" + durability
                        tmp0 = InStr(durability, ":")
                    End While
                    While Len(Mid(durability, tmp0 + 1, Len(durability))) < 3
                        durability = Mid(durability, 1, tmp0) + "0" + Mid(durability, tmp0 + 1, Len(durability))
                    End While
                End If
            Next
            While Len(armorreqlevel) < 3
                armorreqlevel = "0" + armorreqlevel
            End While
            iPARID = "1," + MainProgram.AddSpaceL(ArmorType, 3, 1) + "," + MainProgram.AddSpaceL(LTrim(Str(MaterialNum)), 3, 1) + "," + MainProgram.AddSpaceL(LTrim(Str(CraftsmanshipNum)), 2, 1) + "," + LTrim(Str(QualityNum)) + armorparid
            iWORTH = LTrim(Replace(armorvalue, "+", ""))
        ElseIf TEMType = "Misc" Then
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            'MISC NEEDS TO BE FINISHED FOR RANDOM ITEMS
            iITEMT = "5"
            If TEMType = "?" Then
            Else
                iITEMC = TEMType
                If TEMType2 = "?" Then
                Else

                End If
            End If
        End If
        'for debug purposes until misc is added then it can be removed
        'MainProgram.SND(":" + iITEMN + ":")
        'MainProgram.SND(":" + iSHORT + ":")
        'MainProgram.SND(":" + iLONGD + ":")
        'MainProgram.SND(":" + iLOOKD + ":")
        'MainProgram.SND(":" + iEQUIP + ":")
        'MainProgram.SND(":" + iPARID + ":")
        'MainProgram.SND(":" + iWORTH + ":")
        Return BuildCustomItem(iITEMT, iITEMC, iITEMN, iSHORT, iLONGD, iLOOKD, iEQUIP, iPARID, iWORTH)
    End Function
    Public Function BuildCustomItem(ByVal iITEMT As String, ByVal iITEMC As String, ByVal iITEMN As String, ByVal iSHORT As String, ByVal iLONGD As String, ByVal iLOOKD As String, ByVal iEQUIP As String, ByVal iPARID As String, ByVal iWORTH As String) As String
        MainProgram.CustomItemDataNUM = LTrim(Str(Val(MainProgram.CustomItemDataNUM) + 1))
        MainProgram.CustomItemData += Chr(13) + "VIRID#?" + MainProgram.CustomItemDataNUM + "(?" + MainProgram.CustomItemDataNUM + ")"
        MainProgram.CustomItemData += Chr(13) + "ITEMT#?" + MainProgram.CustomItemDataNUM + "(" + iITEMT + ")"
        MainProgram.CustomItemData += Chr(13) + "ITEMC#?" + MainProgram.CustomItemDataNUM + "(" + iITEMC + ")"
        MainProgram.CustomItemData += Chr(13) + "ITEMN#?" + MainProgram.CustomItemDataNUM + "(" + iITEMN + ")"
        MainProgram.CustomItemData += Chr(13) + "SHORT#?" + MainProgram.CustomItemDataNUM + "(" + iSHORT + ")"
        MainProgram.CustomItemData += Chr(13) + "LONGD#?" + MainProgram.CustomItemDataNUM + "(" + iLONGD + ")"
        MainProgram.CustomItemData += Chr(13) + "LOOKD#?" + MainProgram.CustomItemDataNUM + "(" + iLOOKD + ")"
        MainProgram.CustomItemData += Chr(13) + "EQUIP#?" + MainProgram.CustomItemDataNUM + "(" + iEQUIP + ")"
        MainProgram.CustomItemData += Chr(13) + "PARID#?" + MainProgram.CustomItemDataNUM + "(" + iPARID + ")"
        MainProgram.CustomItemData += Chr(13) + "WORTH#?" + MainProgram.CustomItemDataNUM + "(" + iWORTH + ")"
        Return "?" + MainProgram.CustomItemDataNUM
    End Function
    Sub AddStableRandomItem(ByVal VNUM As String)
        If MainProgram.ItemData_VIRID <> VNUM Then LoadItem.LoadItem(VNUM)
        'This subroutine assumes that the current random item is loaded in memory
        Dim CurItem As Short, FoundLocation As Boolean
        For CurItem = 0 To 59 Step 1
            If RItem_VIRID(CurItem) = "" Then
                RItem_VIRID(CurItem) = MainProgram.ItemData_VIRID
                RItem_ITEMT(CurItem) = MainProgram.ItemData_ITEMT
                RItem_ITEMC(CurItem) = MainProgram.ItemData_ITEMC
                RItem_ITEMN(CurItem) = MainProgram.ItemData_ITEMN
                RItem_SHORT(CurItem) = MainProgram.ItemData_SHORT
                RItem_LONGD(CurItem) = MainProgram.ItemData_LONGD
                RItem_LOOKD(CurItem) = MainProgram.ItemData_LOOKD
                RItem_BasicType(CurItem) = MainProgram.ItemData_BasicType
                RItem_Weight(CurItem) = MainProgram.ItemData_Weight
                RItem_SexRequirement(CurItem) = MainProgram.ItemData_SexRequirement
                RItem_LevelRequirement(CurItem) = MainProgram.ItemData_LevelRequirement
                RItem_ClassRequirement(CurItem) = MainProgram.ItemData_ClassRequirement
                RItem_PurchasableAreas(CurItem) = MainProgram.ItemData_PurchasableAreas
                RItem_BashAC(CurItem) = MainProgram.ItemData_BashAC
                RItem_SlashAC(CurItem) = MainProgram.ItemData_SlashAC
                RItem_PierceAC(CurItem) = MainProgram.ItemData_PierceAC
                RItem_ExoticAC(CurItem) = MainProgram.ItemData_ExoticAC
                RItem_FistAC(CurItem) = MainProgram.ItemData_FistAC
                RItem_Type(CurItem) = MainProgram.ItemData_TYPE
                RItem_Material(CurItem) = MainProgram.ItemData_Material
                RItem_Craftsmanship(CurItem) = MainProgram.ItemData_Craftsmanship
                RItem_Quality(CurItem) = MainProgram.ItemData_Quality
                RItem_ProfReq(CurItem) = MainProgram.ItemData_ProfReq
                RItem_DurabilityCount(CurItem) = MainProgram.ItemData_DurabilityCount
                RItem_DurabilityPerc(CurItem) = MainProgram.ItemData_DurabilityPerc
                RItem_Affect1(CurItem) = MainProgram.ItemData_Affect1
                RItem_Affect2(CurItem) = MainProgram.ItemData_Affect2
                RItem_DamageType(CurItem) = MainProgram.ItemData_DamageType
                RItem_AreaOfAffect(CurItem) = MainProgram.ItemData_AreaOfAffect
                RItem_DamageDie(CurItem) = MainProgram.ItemData_DamageDie
                RItem_DamageDieType(CurItem) = MainProgram.ItemData_DamageDieTypee
                RItem_2Handed(CurItem) = MainProgram.ItemData_2Handed
                RItem_Worth(CurItem) = MainProgram.ItemData_Worth
                FoundLocation = True
                Exit For
            End If
        Next
        If FoundLocation = False Then MainProgram.SND("/RERROR 585: No Random Item Location VNUM Available")
        'The following is a list of data variables used in random items
        'Private RItem_VIRID(59), RItem_ITEMT(59), RItem_ITEMC(59), RItem_ITEMN(59), RItem_SHORT(59), RItem_LONGD(59), RItem_LOOKD(59) As String
        'Private RItem_BasicType(59), RItem_Weigh(59), RItem_SexRequirement(59), RItem_LevelRequirement(59), RItem_ClassRequirement(59), RItem_PurchasableAreas(59) As String
        'Private RItem_BashAC(59), RItem_SlashAC(59), RItem_PierceAC(59), RItem_ExoticAC(59), RItem_FistAC(59), RItem_Type(59), RItem_Material(59), RItem_Craftsmanship(59) As String
        'Private RItem_Quality(59), RItem_ProfReq(59), RItem_DurabilityCount(59), RItem_DurabilityPerc(59), RItem_Affect1(59), RItem_Affect2(59) As String
        'Private RItem_DamageType(59), RItem_AreaOfAffect(59), RItem_DamageDie(59), RItem_DamageDieType(59), RItem_2Handed(59), RItem_Worth(59) As String
        '********************Following Data is used in all types********************
        'ItemData_VIRID = Replace(Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))))), " ", "")
        'ItemData_ITEMT = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_ITEMC = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_ITEMN = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_SHORT = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_LONGD = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_LOOKD = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        'ItemData_ITEMT = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        '********************Following is Miscellaneous Type Only********************
        'ItemData_BasicType = "Miscellaneous"
        'ItemData_Weight = Mid(tmpA, 3, Len(tmpA))
        'ItemData_SexRequirement = "None"
        'ItemData_LevelRequirement = "None"
        'ItemData_ClassRequirement = "None"
        'ItemData_PurchasableAreas = "Unknown"
        '********************Following is Armor Type Only********************
        'ItemData_BasicType = "Armor"
        'ItemData_BashAC = "0"
        'ItemData_SlashAC = "0"
        'ItemData_PierceAC = "0"
        'ItemData_ExoticAC = "0"
        'ItemData_FistAC = "0"  
        'ItemData_TYPE = "Kite Shield"
        'ItemData_Material = "Magnesium"
        'ItemData_Craftsmanship = "Masterwork"
        'ItemData_Quality = "Epic"
        'ItemData_SexRequirement = "Female"
        'ItemData_ClassRequirement = "None" 
        'ItemData_LevelRequirement = LTrim(Str(Val(Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1))))
        'ItemData_ProfReq = Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1)
        'ItemData_Weight = Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1)
        'ItemData_DurabilityCount = LTrim(Str(Val(Mid(tmpC, 1, 3))))
        'ItemData_DurabilityPerc = LTrim(Str(Val(Mid(tmpC, 5, 3))))
        'ItemData_Affect1 = "None"
        'ItemData_Affect2 = "None" 
        'ItemData_PurchasableAreas = Mid(tmpA, tmp2 + 1, Len(tmpA))
        '********************Following is Weapon Type Only********************
        'ItemData_BasicType = "Weapon" 
        'ItemData_TYPE = "Whip"
        'ItemData_Material = "Bamboo"
        'ItemData_Craftsmanship = "Masterwork"
        'ItemData_Quality = "Epic"
        'ItemData_DamageType = "Exotic"
        'ItemData_ClassRequirement = "ERROR HAS REQUIRED CLASS: NEEDS CONFIGURATION!" ---------------Class Requirement is for Armor Only
        'ItemData_AreaOfAffect = Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1)
        'ItemData_DamageDie = Mid(tmpC, 1, tmp00 - 1)
        'ItemData_DamageDieTypee = Mid(tmpC, tmp01 + 1, tmp00 - 1 - tmp01)
        'ItemData_DamagePlus = Mid(tmpC, tmp00 + 1, Len(tmpC))
        'ItemData_2Handed = "No"
        'ItemData_LevelRequirement = LTrim(Str(Val(Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1))))
        'ItemData_SexRequirement = "None"
        'ItemData_Weight = Mid(tmpA, tmp3 + 1, tmp2 - tmp3 - 1)
        'ItemData_DurabilityCount = LTrim(Str(Val(Mid(tmpC, 1, 3))))
        'ItemData_DurabilityPerc = LTrim(Str(Val(Mid(tmpC, 5, 3))))
        'ItemData_Affect1 = "None"
        'ItemData_Affect2 = "None"
        'ItemData_PurchasableAreas = Mid(tmpA, tmp2 + 1, Len(tmpA))
        'ItemData_Worth = Mid(ItemData, tempvar + 7 + Len(LTrim(RTrim(ItemVIRID))), tempvar2 - (tempvar + 7 + Len(LTrim(RTrim(ItemVIRID)))))
        '********************************************************************************
    End Sub
    Sub RemStableRandomItem(ByVal VNUM As String)
        Dim CurItem As Short, FoundLocation As Boolean
        For CurItem = 0 To 59 Step 1
            If RItem_VIRID(CurItem) = VNUM Then
                RItem_VIRID(CurItem) = ""
                FoundLocation = True
                Exit For
            End If
        Next
        If FoundLocation = False Then MainProgram.SND("/RERROR 586: Random Item To Be Removed Not Found")
    End Sub
End Module
